X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=os%2Fos-linux.h;h=90349016ffe1004ae84904ec45922125f8e96b4a;hp=561b273db94e3dcd590e7e6dbfa24e39c497ba00;hb=8cc7afa91ddc5a0980b9d2dbfdd66e1511a0d4b1;hpb=317b95d07d4921d2594a1be6e014c9c2d062fe75 diff --git a/os/os-linux.h b/os/os-linux.h index 561b273d..90349016 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -171,13 +171,13 @@ static inline double os_random_double(os_random_state_t *rs) return val; } -static inline void fio_lookup_raw(dev_t dev, int *majdev, int *mindev) +static inline int fio_lookup_raw(dev_t dev, int *majdev, int *mindev) { struct raw_config_request rq; int fd; if (major(dev) != RAW_MAJOR) - return; + return 1; /* * we should be able to find /dev/rawctl or /dev/raw/rawctl @@ -186,18 +186,19 @@ static inline void fio_lookup_raw(dev_t dev, int *majdev, int *mindev) if (fd < 0) { fd = open("/dev/raw/rawctl", O_RDONLY); if (fd < 0) - return; + return 1; } rq.raw_minor = minor(dev); if (ioctl(fd, RAW_GETBIND, &rq) < 0) { close(fd); - return; + return 1; } close(fd); *majdev = rq.block_major; *mindev = rq.block_minor; + return 0; } #endif