Add OS_PATH_SEPARATOR for platforms which have different path separator characters...
[fio.git] / diskutil.c
index e4b4b8a57830f8c1661672be0fd613e1b9dd40fd..47d739bb4332b7acd7306b47f9c15c65b9a361d4 100644 (file)
@@ -215,7 +215,7 @@ static void find_add_disk_slaves(struct thread_data *td, char *path,
                    !strcmp(dirent->d_name, ".."))
                        continue;
 
-               sprintf(temppath, "%s/%s", slavesdir, dirent->d_name);
+               sprintf(temppath, "%s%s%s", slavesdir, FIO_OS_PATH_SEPARATOR, dirent->d_name);
                /* Can we always assume that the slaves device entries
                 * are links to the real directories for the slave
                 * devices?
@@ -240,7 +240,7 @@ static void find_add_disk_slaves(struct thread_data *td, char *path,
                if (slavedu)
                        continue;
 
-               sprintf(temppath, "%s/%s", slavesdir, slavepath);
+               sprintf(temppath, "%s%s%s", slavesdir, FIO_OS_PATH_SEPARATOR, slavepath);
                __init_per_file_disk_util(td, majdev, mindev, temppath);
                slavedu = disk_util_exists(majdev, mindev);
 
@@ -327,7 +327,7 @@ static int find_block_dir(int majdev, int mindev, char *path, int link_ok)
                if (!strcmp(dir->d_name, ".") || !strcmp(dir->d_name, ".."))
                        continue;
 
-               sprintf(full_path, "%s/%s", path, dir->d_name);
+               sprintf(full_path, "%s%s%s", path, FIO_OS_PATH_SEPARATOR, dir->d_name);
 
                if (!strcmp(dir->d_name, "dev")) {
                        if (!check_dev_match(majdev, mindev, full_path)) {