Whamcloud - gitweb
land b1_5 onto HEAD
[fs/lustre-release.git] / lustre / tests / statmany.c
index 9b18252..63a13ad 100644 (file)
 #include <sys/ioctl.h>
 
 #if 0
-#include <linux/extN_fs.h>
+#include <linux/ldiskfs_fs.h>
 #endif
 #include <liblustre.h>
-#include <linux/lustre_lib.h>
-#include <linux/obd.h>
+#include <lustre_lib.h>
+#include <obd.h>
 
 struct option longopts[] = {
        {"ea", 0, 0, 'e'},
@@ -44,10 +44,10 @@ static int usage(char *prog, FILE *out)
 
 int main(int argc, char ** argv)
 {
-        long i, count, iter = LONG_MAX, mode = 0, offset;
+        long i, c, 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;
+       char *prog = argv[0], *base;
        int seed = 0;
        int fd = -1;
 
@@ -88,11 +88,6 @@ 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);
@@ -158,7 +153,7 @@ int main(int argc, char ** argv)
                                        strerror(errno));
                                 break;
                         }
-                        rc = ioctl(fd, EXTN_IOC_GETEA, NULL);
+                        rc = ioctl(fd, LDISKFS_IOC_GETEA, NULL);
                         if (rc < 0) {
                                 printf("ioctl(%s) error: %s\n", filename,
                                        strerror(errno));