Whamcloud - gitweb
Get the RC from update_oldconfig properly.
[fs/lustre-release.git] / lustre / tests / statmany.c
index f6370e3..9b18252 100644 (file)
@@ -14,6 +14,7 @@
 #if 0
 #include <linux/extN_fs.h>
 #endif
+#include <liblustre.h>
 #include <linux/lustre_lib.h>
 #include <linux/obd.h>
 
@@ -43,7 +44,7 @@ static int usage(char *prog, FILE *out)
 
 int main(int argc, char ** argv)
 {
-        long i, count, iter = LONG_MAX, mode, offset;
+        long i, count, iter = LONG_MAX, mode = 0, offset;
         long int start, length = LONG_MAX, last, rc = 0;
         char parent[4096], *t;
        char c, *prog = argv[0], *base;
@@ -87,6 +88,11 @@ int main(int argc, char ** argv)
                }
        }
 
+       if (mode == 0) {
+               fprintf(stderr, "one of '-l', '-e', or '-s' must be supplied.\n");
+               usage(prog, stderr);
+       }
+
        if (optind + 2 + (length == LONG_MAX) != argc) {
                fprintf(stderr, "missing filenamebase, total_files, or iterations\n");
                usage(prog, stderr);