FIO Windows update
[fio.git] / init.c
diff --git a/init.c b/init.c
index bdbb3774e8598874f2c555724a4f2d7c68f84290..0a3529d08425fa53bb3319a52ad319079a6e3cbd 100644 (file)
--- a/init.c
+++ b/init.c
@@ -431,7 +431,9 @@ static int exists_and_not_file(const char *filename)
        if (lstat(filename, &sb) == -1)
                return 0;
 
-       if (S_ISREG(sb.st_mode))
+       /* \\.\ is the device namespace in Windows, where every file
+        * is a device node */
+       if (S_ISREG(sb.st_mode) && strncmp(filename, "\\\\.\\", 4) != 0)
                return 0;
 
        return 1;