Fix statfs(64) syscall wrapper, by Andreas Schwab.
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 20 Jul 2007 15:54:27 +0000 (15:54 +0000)
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 20 Jul 2007 15:54:27 +0000 (15:54 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3082 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/syscall.c
linux-user/syscall_defs.h

index 1d010f74549abefc8878faaa72c52b7a718cb736..a4add6494f8a00cd6cce5f03903da4a81007f207 100644 (file)
@@ -3352,7 +3352,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
             put_user(stfs.f_bavail, &target_stfs->f_bavail);
             put_user(stfs.f_files, &target_stfs->f_files);
             put_user(stfs.f_ffree, &target_stfs->f_ffree);
-            put_user(stfs.f_fsid.__val[0], &target_stfs->f_fsid);
+            put_user(stfs.f_fsid.__val[0], &target_stfs->f_fsid.val[0]);
+            put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]);
             put_user(stfs.f_namelen, &target_stfs->f_namelen);
             unlock_user_struct(target_stfs, arg2, 1);
         }
@@ -3378,7 +3379,8 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
             put_user(stfs.f_bavail, &target_stfs->f_bavail);
             put_user(stfs.f_files, &target_stfs->f_files);
             put_user(stfs.f_ffree, &target_stfs->f_ffree);
-            put_user(stfs.f_fsid.__val[0], &target_stfs->f_fsid);
+            put_user(stfs.f_fsid.__val[0], &target_stfs->f_fsid.val[0]);
+            put_user(stfs.f_fsid.__val[1], &target_stfs->f_fsid.val[1]);
             put_user(stfs.f_namelen, &target_stfs->f_namelen);
             unlock_user_struct(target_stfs, arg3, 0);
         }
index 7b4122fede1a457174e7436641965b3d1285edfe..31e1b329014f6fc4ad41df801d7bfbf32c357f81 100644 (file)
@@ -1356,6 +1356,10 @@ struct target_stat64 {
 #error unsupported CPU
 #endif
 
+typedef struct {
+        int     val[2];
+} target_fsid_t;
+
 #ifdef TARGET_MIPS
 struct target_statfs {
        target_long             f_type;
@@ -1368,7 +1372,7 @@ struct target_statfs {
        target_long             f_bavail;
 
        /* Linux specials */
-       int     f_fsid;
+       target_fsid_t           f_fsid;
        target_long             f_namelen;
        target_long             f_spare[6];
 };
@@ -1383,7 +1387,7 @@ struct target_statfs64 {
        uint64_t        f_files;
        uint64_t        f_ffree;
        uint64_t        f_bavail;
-       int f_fsid;
+       target_fsid_t   f_fsid;
        uint32_t        f_namelen;
        uint32_t        f_spare[6];
 };
@@ -1396,7 +1400,7 @@ struct target_statfs {
        uint32_t f_bavail;
        uint32_t f_files;
        uint32_t f_ffree;
-       int f_fsid;
+       target_fsid_t f_fsid;
        uint32_t f_namelen;
        uint32_t f_frsize;
        uint32_t f_spare[5];
@@ -1410,7 +1414,7 @@ struct target_statfs64 {
        uint64_t f_bavail;
        uint64_t f_files;
        uint64_t f_ffree;
-       int f_fsid;
+       target_fsid_t f_fsid;
         uint32_t f_namelen;
        uint32_t f_frsize;
        uint32_t f_spare[5];