From: Lionel Sambuc Date: Mon, 12 May 2014 09:34:18 +0000 (+0200) Subject: Message type for VFS_GETVFSSTAT X-Git-Tag: v3.3.0~323 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.named-checkconf.html?a=commitdiff_plain;h=ccdf11c7cfd2abaf3b359508674740f6d565d4fb;p=minix.git Message type for VFS_GETVFSSTAT Change-Id: I27f1f6dc37832ee4adb9854c7306ce6153e31567 --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 4de7c2d43..b110b588c 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -232,11 +232,6 @@ #define NR_VFS_CALLS 49 /* highest number from base plus one */ -/* Field names for the getvfsstat(2) call. */ -#define VFS_GETVFSSTAT_BUF m1_p1 /* struct statvfs * */ -#define VFS_GETVFSSTAT_LEN m1_i1 /* size_t */ -#define VFS_GETVFSSTAT_FLAGS m1_i2 /* int */ - /* Field names for the statvfs1(2) and fstatvfs1(2) calls. */ #define VFS_STATVFS1_LEN m1_i1 /* size_t */ #define VFS_STATVFS1_NAME m1_p1 /* const char * */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 48fa5970c..367afb89b 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -146,6 +146,15 @@ typedef struct { } mess_sigcalls; _ASSERT_MSG_SIZE(mess_sigcalls); +typedef struct { + int32_t flags; + size_t len; + vir_bytes buf; /* struct statvfs */ + + uint8_t padding[44]; +} mess_lc_vfs_getvfsstat; +_ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat); + typedef struct { uint32_t nfds; fd_set *readfds; @@ -608,6 +617,7 @@ typedef struct { mess_fs_vfs_readsuper m_fs_vfs_readsuper; mess_fs_vfs_readwrite m_fs_vfs_readwrite; + mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat; mess_lc_vfs_select m_lc_vfs_select; mess_vfs_fs_breadwrite m_vfs_fs_breadwrite; diff --git a/lib/libc/sys-minix/getvfsstat.c b/lib/libc/sys-minix/getvfsstat.c index 0c8055ada..5d1fd1887 100644 --- a/lib/libc/sys-minix/getvfsstat.c +++ b/lib/libc/sys-minix/getvfsstat.c @@ -10,8 +10,8 @@ int getvfsstat(struct statvfs *buf, size_t bufsize, int flags) message m; memset(&m, 0, sizeof(m)); - m.VFS_GETVFSSTAT_BUF = (char *) buf; - m.VFS_GETVFSSTAT_LEN = bufsize; - m.VFS_GETVFSSTAT_FLAGS = flags; + m.m_lc_vfs_getvfsstat.buf = (vir_bytes) buf; + m.m_lc_vfs_getvfsstat.len = bufsize; + m.m_lc_vfs_getvfsstat.flags = flags; return(_syscall(VFS_PROC_NR, VFS_GETVFSSTAT, &m)); } diff --git a/servers/vfs/stadir.c b/servers/vfs/stadir.c index b8dfc087f..a95bfc8f3 100644 --- a/servers/vfs/stadir.c +++ b/servers/vfs/stadir.c @@ -356,9 +356,9 @@ int do_getvfsstat(void) size_t bufsize; int r, flags, count, do_lock; - buf = (vir_bytes) job_m_in.VFS_GETVFSSTAT_BUF; - bufsize = job_m_in.VFS_GETVFSSTAT_LEN; - flags = job_m_in.VFS_GETVFSSTAT_FLAGS; + buf = job_m_in.m_lc_vfs_getvfsstat.buf; + bufsize = job_m_in.m_lc_vfs_getvfsstat.len; + flags = job_m_in.m_lc_vfs_getvfsstat.flags; count = 0;