X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=diskutil.c;h=789071d197fcd2a4bd2abd9dfc01c1ae4235e954;hp=4fe554f561af20919434fcbdeef4cfd66e8dd0f9;hb=ae626d4ead6416adf464cf209cdf3e8b85d58190;hpb=84e893fd54a0895b9eadd8b4c62243faf19c9305 diff --git a/diskutil.c b/diskutil.c index 4fe554f5..789071d1 100644 --- a/diskutil.c +++ b/diskutil.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include @@ -245,7 +246,7 @@ static void find_add_disk_slaves(struct thread_data *td, char *path, * devices? */ linklen = readlink(temppath, slavepath, PATH_MAX - 1); - if (linklen < 0) { + if (linklen < 0) { 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); + if (access(temppath, F_OK) != 0) + sprintf(temppath, "%s/%s/device/dev", slavesdir, slavepath); if (read_block_dev_entry(temppath, &majdev, &mindev)) { - perror("Error getting slave device numbers."); + perror("Error getting slave device numbers"); closedir(dirhandle); return; }