fix
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 27 Sep 2004 18:50:11 +0000 (18:50 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 27 Sep 2004 18:50:11 +0000 (18:50 +0000)
ChangeLog
include/linux/fuse.h
kernel/fuse_i.h
lib/fuse.c
lib/fuse_i.h

index ff0ab3e335456ac5cd963ba3e8aff1c4aa29884e..bee808782b8e7fdbc253b79778d8250a24698329 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
 
        * Add PID to fuse_context.  Patch by Steven James
 
+       * Change file handle type to 'unsigned long' in kernel interface
+
 2004-09-22  Miklos Szeredi <miklos@szeredi.hu>
 
        * A slight API change: fuse_get_context() doesn't need the "fuse"
index 4dfd61bd9e1c0393e37e3bf6320ec8aeeee89dbe..21ecc47f6375ef536990783dc29f7186a4a35ee3 100644 (file)
@@ -144,27 +144,27 @@ struct fuse_open_in {
 };
 
 struct fuse_open_out {
-       unsigned int fh;
+       unsigned long fh;
 };
 
 struct fuse_release_in {
-       unsigned int fh;
+       unsigned long fh;
        unsigned int flags;
 };
 
 struct fuse_flush_in {
-       unsigned int fh;
+       unsigned long fh;
 };
 
 struct fuse_read_in {
-       unsigned int fh;
+       unsigned long fh;
        unsigned long long offset;
        unsigned int size;
 };
 
 struct fuse_write_in {
        int writepage;
-       unsigned int fh;
+       unsigned long fh;
        unsigned long long offset;
        unsigned int size;
 };
@@ -178,7 +178,7 @@ struct fuse_statfs_out {
 };
 
 struct fuse_fsync_in {
-       unsigned int fh;
+       unsigned long fh;
        int datasync;
 };
 
index d92e7954792355f3e35bd2c22795f8887c554f71..23a4f77df634c72a687cdba8616d86309f413027 100644 (file)
@@ -82,7 +82,7 @@ struct fuse_inode {
 /** FUSE specific file data */
 struct fuse_file {
        struct fuse_req *release_req;
-       unsigned int fh;
+       unsigned long fh;
        struct list_head ff_list;
 };
 
index 1a3f4d069004f40af8a470475120f5872364b1ae..f609326319eaccdd97577058735412371d202cb2 100644 (file)
@@ -1043,7 +1043,7 @@ static void do_open(struct fuse *f, struct fuse_in_header *in,
         f->fh_ctr ++;
         outarg.fh = f->fh_ctr;
         if (f->flags & FUSE_DEBUG) {
-            printf("OPEN[%u] flags: 0x%x\n", outarg.fh, arg->flags);
+            printf("OPEN[%lu] flags: 0x%x\n", outarg.fh, arg->flags);
             fflush(stdout);
         }
 
@@ -1073,7 +1073,7 @@ static void do_flush(struct fuse *f, struct fuse_in_header *in,
     path = get_path(f, in->ino);
     if (path != NULL) {
         if (f->flags & FUSE_DEBUG) {
-            printf("FLUSH[%u]\n", arg->fh);
+            printf("FLUSH[%lu]\n", arg->fh);
             fflush(stdout);
         }
         res = -ENOSYS;
@@ -1098,7 +1098,7 @@ static void do_release(struct fuse *f, struct fuse_in_header *in,
     path = get_path(f, in->ino);
     if (path != NULL) {
         if (f->flags & FUSE_DEBUG) {
-            printf("RELEASE[%u]\n", arg->fh);
+            printf("RELEASE[%lu]\n", arg->fh);
             fflush(stdout);
         }
         if (f->op.release)
@@ -1131,7 +1131,7 @@ static void do_read(struct fuse *f, struct fuse_in_header *in,
         path = get_path(f, in->ino);
         if (path != NULL) {
             if (f->flags & FUSE_DEBUG) {
-                printf("READ[%u] %u bytes from %llu\n", arg->fh, arg->size,
+                printf("READ[%lu] %u bytes from %llu\n", arg->fh, arg->size,
                        arg->offset);
                 fflush(stdout);
             }
@@ -1147,7 +1147,7 @@ static void do_read(struct fuse *f, struct fuse_in_header *in,
             size = res;
             res = 0;
             if (f->flags & FUSE_DEBUG) {
-                printf("   READ[%u] %u bytes\n", arg->fh, size);
+                printf("   READ[%lu] %u bytes\n", arg->fh, size);
                 fflush(stdout);
             }
         }
@@ -1172,7 +1172,7 @@ static void do_write(struct fuse *f, struct fuse_in_header *in,
     path = get_path(f, in->ino);
     if (path != NULL) {
         if (f->flags & FUSE_DEBUG) {
-            printf("WRITE%s[%u] %u bytes to %llu\n",
+            printf("WRITE%s[%lu] %u bytes to %llu\n",
                    arg->writepage ? "PAGE" : "", arg->fh, arg->size,
                    arg->offset);
             fflush(stdout);
@@ -1238,7 +1238,7 @@ static void do_fsync(struct fuse *f, struct fuse_in_header *in,
     path = get_path(f, in->ino);
     if (path != NULL) {
         if (f->flags & FUSE_DEBUG) {
-            printf("FSYNC[%u]\n", inarg->fh);
+            printf("FSYNC[%lu]\n", inarg->fh);
             fflush(stdout);
         }
         res = -ENOSYS;
index c1aaa4c9fc8ba93cdef286fdc681966f9581fac0..2c7e2d0c751fc6fe2cd88b1d922179cde8729ba1 100644 (file)
@@ -47,7 +47,7 @@ struct fuse {
     fino_t ctr;
     unsigned int generation;
     unsigned int hidectr;
-    unsigned int fh_ctr;
+    unsigned long fh_ctr;
     pthread_mutex_t lock;
     int numworker;
     int numavail;