projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better checks for disk util init
[fio.git]
/
os
/
os-linux.h
diff --git
a/os/os-linux.h
b/os/os-linux.h
index 561b273db94e3dcd590e7e6dbfa24e39c497ba00..90349016ffe1004ae84904ec45922125f8e96b4a 100644
(file)
--- 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;
}
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)
{
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
/*
* 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)
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);
}
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;
}
close(fd);
*majdev = rq.block_major;
*mindev = rq.block_minor;
+ return 0;
}
#endif
}
#endif