Whamcloud - gitweb
e2fsck: report ext2fs_open2() and ext2fs_check_desc() errors
[tools/e2fsprogs.git] / e2fsck / scantest.c
index 3709476..852ff86 100644 (file)
@@ -2,6 +2,7 @@
  * scantest.c - test the speed of the inode scan routine
  */
 
+#include "config.h"
 #include <string.h>
 #include <fcntl.h>
 #include <ctype.h>
@@ -15,7 +16,9 @@
 #include <mntent.h>
 #endif
 #include <sys/ioctl.h>
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 #include <sys/resource.h>
 
 #include "et/com_err.h"
@@ -29,8 +32,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 
-#include <linux/ext2_fs.h>
-
+#include "ext2fs/ext2_fs.h"
 #include "ext2fs/ext2fs.h"
 
 
@@ -54,7 +56,7 @@ struct resource_track global_rtrack;
 void init_resource_track(struct resource_track *track)
 {
        struct rusage r;
-       
+
        track->brk_start = sbrk(0);
        gettimeofday(&track->time_start, 0);
        getrusage(RUSAGE_SELF, &r);
@@ -99,7 +101,7 @@ int main (int argc, char *argv[])
        printf(_("size of inode=%d\n"), sizeof(inode));
 
        device_name = "/dev/hda3";
-       
+
        init_resource_track(&global_rtrack);
 
        retval = ext2fs_open(device_name, 0,
@@ -132,11 +134,11 @@ int main (int argc, char *argv[])
                        exit(1);
                }
        }
-       
+
 
        ext2fs_close(fs);
-       
+
        print_resource_track(&global_rtrack);
-       
+
        return exit_value;
 }