]> Zhao Yanbai Git Server - minix.git/commitdiff
Message types for VFS statvfs
authorLionel Sambuc <lionel@minix3.org>
Thu, 1 May 2014 09:19:18 +0000 (11:19 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:29 +0000 (17:05 +0200)
Change-Id: If84f53577510399aa1238cfcd0b8aa1fb13c2490

include/minix/ipc.h
lib/libpuffs/stadir.c
lib/libsffs/misc.c
lib/libvtreefs/stadir.c
servers/ext2/stadir.c
servers/iso9660fs/stadir.c
servers/mfs/stadir.c
servers/vfs/request.c

index 36420c9c7ba1c4739777c75635e454903f9717a1..f892cc647447bdd6a11dc33faff1e636c6cb6dfa 100644 (file)
@@ -430,6 +430,13 @@ typedef struct {
 } mess_vfs_fs_stat;
 _ASSERT_MSG_SIZE(mess_vfs_fs_stat);
 
+typedef struct {
+       cp_grant_id_t grant;
+
+       uint8_t data[52];
+} mess_vfs_fs_statvfs;
+_ASSERT_MSG_SIZE(mess_vfs_fs_statvfs);
+
 typedef struct {
        ino_t inode;
 
@@ -547,6 +554,7 @@ typedef struct {
        mess_vfs_fs_rename m_vfs_fs_rename;
        mess_vfs_fs_slink m_vfs_fs_slink;
        mess_vfs_fs_stat m_vfs_fs_stat;
+       mess_vfs_fs_statvfs m_vfs_fs_statvfs;
        mess_vfs_fs_unlink m_vfs_fs_unlink;
        mess_vfs_fs_utime m_vfs_fs_utime;
        mess_vfs_utimens m_vfs_utimens;
index 0189ca017c26f39dce1d3ef4e59edfa4b3a882fb..291b098c4f552f6cfe81ec897760a5309af69eac 100644 (file)
@@ -97,8 +97,8 @@ int fs_statvfs(void)
   st.f_flag |= ST_NOTRUNC;
 
   /* Copy the struct to user space. */
-  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st));
+  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
+                       (vir_bytes) &st, (phys_bytes) sizeof(st));
 
   return(r);
 }
index a14181db85a76c10a2acba5d4aae4bd4891a5581..59ebb095169ff72e59f3ee05a899d34925ba16b2 100644 (file)
@@ -52,6 +52,6 @@ int do_statvfs(void)
   statvfs.f_bavail = statvfs.f_bfree;
   statvfs.f_namemax = NAME_MAX;
 
-  return sys_safecopyto(m_in.m_source, m_in.REQ_GRANT, 0,
-       (vir_bytes) &statvfs, sizeof(statvfs));
+  return sys_safecopyto(m_in.m_source, m_in.m_vfs_fs_statvfs.grant, 0,
+                       (vir_bytes) &statvfs, sizeof(statvfs));
 }
index ab9cfe478e4df15cea34e262ed58ecbc7ddc0c63..615d886fbfd79de63946801b6e756c4a53af5275 100644 (file)
@@ -68,6 +68,6 @@ int fs_statvfs(void)
        statvfs.f_flag = ST_NOTRUNC;
        statvfs.f_namemax = PNAME_MAX;
 
-       return sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0,
-               (vir_bytes) &statvfs, sizeof(statvfs));
+       return sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant,
+                               0, (vir_bytes) &statvfs, sizeof(statvfs));
 }
index 2db84269a1a8aa1afbab4de416b81cb078c7afdb..706bfa9c521664a22f4faf4fade797559e1ac041 100644 (file)
@@ -101,8 +101,8 @@ int fs_statvfs()
   st.f_namemax = NAME_MAX;
 
   /* Copy the struct to user space. */
-  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st));
+  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
+                       (vir_bytes) &st, (phys_bytes) sizeof(st));
 
   return(r);
 }
index 17f807214eb84d74d2d335c90980a280a198b33a..9f0d9d607f551561a4c1207e30c8ec50301cf53a 100644 (file)
@@ -109,8 +109,8 @@ int fs_statvfs()
   st.f_namemax = NAME_MAX;
 
   /* Copy the struct to user space. */
-  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st));
+  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
+                        (vir_bytes) &st, (phys_bytes) sizeof(st));
   
   return(r);
 }
index 0ca88ec267056fa0d4a117eadbbe1596c01a77fc..3f2ba0039d629803d5ea97b6b10f35bd83917c40 100644 (file)
@@ -113,8 +113,8 @@ int fs_statvfs()
   st.f_namemax = MFS_DIRSIZ;
 
   /* Copy the struct to user space. */
-  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.REQ_GRANT, 0, (vir_bytes) &st,
-                    (phys_bytes) sizeof(st));
+  r = sys_safecopyto(fs_m_in.m_source, fs_m_in.m_vfs_fs_statvfs.grant, 0,
+                       (vir_bytes) &st, (phys_bytes) sizeof(st));
   
   return(r);
 }
index 81c6b5c0459b276180713f7a7639d0da1e809d10..4c028f743aa288cea0616421d8db36f74a693180 100644 (file)
@@ -243,7 +243,7 @@ int req_statvfs(endpoint_t fs_e, struct statvfs *buf)
 
   /* Fill in request message */
   m.m_type = REQ_STATVFS;
-  m.REQ_GRANT = grant_id;
+  m.m_vfs_fs_statvfs.grant = grant_id;
 
   /* Send/rec request */
   r = fs_sendrec(fs_e, &m);