From: Lionel Sambuc Date: Mon, 12 May 2014 12:19:05 +0000 (+0200) Subject: Message type for VFS_FSTAT X-Git-Tag: v3.3.0~307 X-Git-Url: http://zhaoyanbai.com/repos/doxygen.log?a=commitdiff_plain;h=bb2b07940c5612f1d2403ddf4221ed2e3ffbf026;p=minix.git Message type for VFS_FSTAT Change-Id: Ibdedcac120fc4bf78e28291d9c97fe02df1928db --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index c4915d08e..4501b012a 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -232,10 +232,6 @@ #define NR_VFS_CALLS 49 /* highest number from base plus one */ -/* Field names for the fstat(2) call. */ -#define VFS_FSTAT_FD m1_i1 /* int */ -#define VFS_FSTAT_BUF m1_p1 /* struct stat * */ - /* Field names for the fcntl(2) call. */ #define VFS_FCNTL_FD m1_i1 /* int */ #define VFS_FCNTL_CMD m1_i2 /* int */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 42bea3f58..5721a6337 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -146,6 +146,14 @@ typedef struct { } mess_sigcalls; _ASSERT_MSG_SIZE(mess_sigcalls); +typedef struct { + int fd; + vir_bytes buf; /* struct stat * */ + + uint8_t padding[48]; +} mess_lc_vfs_fstat; +_ASSERT_MSG_SIZE(mess_lc_vfs_fstat); + typedef struct { int fd; @@ -769,6 +777,7 @@ typedef struct { mess_fs_vfs_readsuper m_fs_vfs_readsuper; mess_fs_vfs_readwrite m_fs_vfs_readwrite; + mess_lc_vfs_fstat m_lc_vfs_fstat; mess_lc_vfs_fsync m_lc_vfs_fsync; mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat; mess_lc_vfs_ioctl m_lc_vfs_ioctl; diff --git a/lib/libc/sys-minix/stat.c b/lib/libc/sys-minix/stat.c index 371de65a8..cd425f97d 100644 --- a/lib/libc/sys-minix/stat.c +++ b/lib/libc/sys-minix/stat.c @@ -32,8 +32,8 @@ int fstat(int fd, struct stat *buffer) message m; memset(&m, 0, sizeof(m)); - m.VFS_FSTAT_FD = fd; - m.VFS_FSTAT_BUF = (char *) buffer; + m.m_lc_vfs_fstat.fd = fd; + m.m_lc_vfs_fstat.buf = (vir_bytes)buffer; return _syscall(VFS_PROC_NR, VFS_FSTAT, &m); } diff --git a/servers/vfs/stadir.c b/servers/vfs/stadir.c index e85be0075..c57de4fd6 100644 --- a/servers/vfs/stadir.c +++ b/servers/vfs/stadir.c @@ -177,8 +177,8 @@ int do_fstat(void) int r, rfd; vir_bytes statbuf; - statbuf = (vir_bytes) job_m_in.VFS_FSTAT_BUF; - rfd = job_m_in.VFS_FSTAT_FD; + statbuf = job_m_in.m_lc_vfs_fstat.buf; + rfd = job_m_in.m_lc_vfs_fstat.fd; /* Is the file descriptor valid? */ if ((rfilp = get_filp(rfd, VNODE_READ)) == NULL) return(err_code);