projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split mutex.c and .h each into three files
[fio.git]
/
diskutil.c
diff --git
a/diskutil.c
b/diskutil.c
index 4fe554f561af20919434fcbdeef4cfd66e8dd0f9..789071d197fcd2a4bd2abd9dfc01c1ae4235e954 100644
(file)
--- a/
diskutil.c
+++ b/
diskutil.c
@@
-3,6
+3,7
@@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <dirent.h>
#include <libgen.h>
#include <math.h>
#include <dirent.h>
#include <libgen.h>
#include <math.h>
@@
-245,7
+246,7
@@
static void find_add_disk_slaves(struct thread_data *td, char *path,
* devices?
*/
linklen = readlink(temppath, slavepath, PATH_MAX - 1);
* devices?
*/
linklen = readlink(temppath, slavepath, PATH_MAX - 1);
- if (linklen
< 0) {
+ if (linklen < 0) {
perror("readlink() for slave device.");
closedir(dirhandle);
return;
perror("readlink() for slave device.");
closedir(dirhandle);
return;
@@
-253,8
+254,10
@@
static void find_add_disk_slaves(struct thread_data *td, char *path,
slavepath[linklen] = '\0';
sprintf(temppath, "%s/%s/dev", slavesdir, slavepath);
slavepath[linklen] = '\0';
sprintf(temppath, "%s/%s/dev", slavesdir, slavepath);
+ if (access(temppath, F_OK) != 0)
+ sprintf(temppath, "%s/%s/device/dev", slavesdir, slavepath);
if (read_block_dev_entry(temppath, &majdev, &mindev)) {
if (read_block_dev_entry(temppath, &majdev, &mindev)) {
- perror("Error getting slave device numbers
.
");
+ perror("Error getting slave device numbers");
closedir(dirhandle);
return;
}
closedir(dirhandle);
return;
}