FIO Windows update
[fio.git] / init.c
diff --git a/init.c b/init.c
index 2e443f66422ac60671b2704950f5bd25320dfca6..0a3529d08425fa53bb3319a52ad319079a6e3cbd 100644 (file)
--- a/init.c
+++ b/init.c
@@ -22,7 +22,7 @@
 
 #include "lib/getopt.h"
 
-static char fio_version_string[] = "fio 1.44.2";
+static char fio_version_string[] = "fio 1.44.3";
 
 #define FIO_RANDSEED           (0xb1899bedUL)
 
@@ -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;
@@ -958,7 +960,6 @@ static int setup_thread_area(void)
 
 static void usage(const char *name)
 {
-       printf("%s\n", fio_version_string);
        printf("%s [options] [job options] <job file(s)>\n", name);
        printf("\t--debug=options\tEnable debug logging\n");
        printf("\t--output\tWrite output to file\n");
@@ -1197,6 +1198,8 @@ int parse_options(int argc, char *argv[])
        f_out = stdout;
        f_err = stderr;
 
+       log_info("%s\n", fio_version_string);
+
        fio_options_dup_and_init(l_opts);
 
        if (setup_thread_area())
@@ -1223,7 +1226,7 @@ int parse_options(int argc, char *argv[])
                if (exec_profile)
                        return 0;
 
-               log_err("No jobs defined(s)\n\n");
+               log_err("No jobs(s) defined\n\n");
                usage(argv[0]);
                return 1;
        }