Browse Source

Correct some potential 32bit/64bit issues.

Godzil 4 years ago
parent
commit
1cf7fd077c
2 changed files with 4 additions and 4 deletions
  1. 3 3
      include/fusd_msg.h
  2. 1 1
      kfusd/kfusd.c

+ 3 - 3
include/fusd_msg.h

@@ -98,7 +98,7 @@ typedef struct {
   pid_t pid;
   uid_t uid;
   gid_t gid;
-  unsigned int flags;		/* flags from file struct */
+  unsigned long flags;		/* flags from file struct */
   void *device_info;		/* device info */
   void *private_info;		/* file info */
 
@@ -106,8 +106,8 @@ typedef struct {
    * union but it just makes things too complex and doesn't save all
    * that much memory anyway */
   ssize_t retval;
-  size_t length;
-  loff_t offset;
+  unsigned long length;
+  unsigned long offset;
   unsigned int cmd;  /* ioctl cmd, poll_diff cached_state */
 
   union {

+ 1 - 1
kfusd/kfusd.c

@@ -1620,7 +1620,7 @@ struct fusd_mmap_instance {
     fusd_dev_t *fusd_dev;
     fusd_file_t *fusd_file;
     unsigned long addr;
-    int size;
+    unsigned long size;
     atomic_t refcount;
 };