From: Lionel Sambuc Date: Thu, 1 May 2014 09:19:18 +0000 (+0200) Subject: Message types for VFS statvfs X-Git-Tag: v3.3.0~330 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.arpaname.html?a=commitdiff_plain;h=fd32afa654fbf7f0e8ad325fedc38b8462211519;p=minix.git Message types for VFS statvfs Change-Id: If84f53577510399aa1238cfcd0b8aa1fb13c2490 --- diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 36420c9c7..f892cc647 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -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; diff --git a/lib/libpuffs/stadir.c b/lib/libpuffs/stadir.c index 0189ca017..291b098c4 100644 --- a/lib/libpuffs/stadir.c +++ b/lib/libpuffs/stadir.c @@ -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); } diff --git a/lib/libsffs/misc.c b/lib/libsffs/misc.c index a14181db8..59ebb0951 100644 --- a/lib/libsffs/misc.c +++ b/lib/libsffs/misc.c @@ -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)); } diff --git a/lib/libvtreefs/stadir.c b/lib/libvtreefs/stadir.c index ab9cfe478..615d886fb 100644 --- a/lib/libvtreefs/stadir.c +++ b/lib/libvtreefs/stadir.c @@ -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)); } diff --git a/servers/ext2/stadir.c b/servers/ext2/stadir.c index 2db84269a..706bfa9c5 100644 --- a/servers/ext2/stadir.c +++ b/servers/ext2/stadir.c @@ -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); } diff --git a/servers/iso9660fs/stadir.c b/servers/iso9660fs/stadir.c index 17f807214..9f0d9d607 100644 --- a/servers/iso9660fs/stadir.c +++ b/servers/iso9660fs/stadir.c @@ -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); } diff --git a/servers/mfs/stadir.c b/servers/mfs/stadir.c index 0ca88ec26..3f2ba0039 100644 --- a/servers/mfs/stadir.c +++ b/servers/mfs/stadir.c @@ -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); } diff --git a/servers/vfs/request.c b/servers/vfs/request.c index 81c6b5c04..4c028f743 100644 --- a/servers/vfs/request.c +++ b/servers/vfs/request.c @@ -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);