Fix stat(2) related bugs introduced by changes made for Windows
[fio.git] / filesetup.c
index d208a69e3d283abb8c65003d82978c5437524979..a48faf588140ca79f7f00a8a95f63266a63f7a39 100644 (file)
@@ -1225,10 +1225,12 @@ static void get_file_type(struct fio_file *f)
        else
                f->filetype = FIO_TYPE_FILE;
 
        else
                f->filetype = FIO_TYPE_FILE;
 
+#ifdef WIN32
        /* \\.\ is the device namespace in Windows, where every file is
         * a block device */
        if (strncmp(f->file_name, "\\\\.\\", 4) == 0)
                f->filetype = FIO_TYPE_BD;
        /* \\.\ is the device namespace in Windows, where every file is
         * a block device */
        if (strncmp(f->file_name, "\\\\.\\", 4) == 0)
                f->filetype = FIO_TYPE_BD;
+#endif
 
        if (!stat(f->file_name, &sb)) {
                if (S_ISBLK(sb.st_mode))
 
        if (!stat(f->file_name, &sb)) {
                if (S_ISBLK(sb.st_mode))