make portable to 64bit/32bit
authorroot <root@hsm1n1.VSOFS1.COM>
Sun, 17 Aug 2008 04:42:18 +0000 (14:42 +1000)
committerroot <root@hsm1n1.VSOFS1.COM>
Sun, 17 Aug 2008 04:42:18 +0000 (14:42 +1000)
Makefile
hacksm.h
hacksm_migrate.c

index e8cc470..6e06659 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -g -m32
+CFLAGS=-Wall -g 
 LIBS=-ldmapi
 
 all: hacksmd hacksm_migrate hacksm_ls
index 09d1875..fbc4282 100644 (file)
--- a/hacksm.h
+++ b/hacksm.h
@@ -18,6 +18,7 @@
 #include <time.h>
 #include <aio.h>
 #include <dmapi.h>
+#include <stdint.h>
 
 #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
 
@@ -38,9 +39,9 @@ enum hsm_migrate_state {
 struct hsm_attr {
        char magic[4];
        time_t migrate_time;
-       off_t size;
-       dev_t device;
-       ino_t inode;
+       uint64_t size;
+       uint64_t device;
+       uint64_t inode;
        enum hsm_migrate_state state;
 };
 
index 3bd6c40..fc8e95b 100644 (file)
@@ -12,7 +12,7 @@
 static struct {
        unsigned wait_time;
 } options = {
-       .wait_time = 100,
+       .wait_time = 0,
 };
 
 static struct {