From: Lionel Sambuc Date: Mon, 12 May 2014 14:58:19 +0000 (+0200) Subject: Message type for VFS_FCHDIR X-Git-Tag: v3.3.0~301 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/doc/syslog.3.html?a=commitdiff_plain;h=4635162db2365ba73e4046a12d258bb1fdb46920;p=minix.git Message type for VFS_FCHDIR Change-Id: Ie7de90d37a39e89f35438a5b01a9e878a06194b2 --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index b847bf96b..7548a1e85 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -232,9 +232,6 @@ #define NR_VFS_CALLS 49 /* highest number from base plus one */ -/* Field names for the fchdir(2) call. */ -#define VFS_FCHDIR_FD m1_i1 /* int */ - /* Field names for the fchmod(2) call. */ #define VFS_FCHMOD_FD m1_i1 /* int */ #define VFS_FCHMOD_MODE m1_i2 /* mode_t */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index d4ba5793d..8f9278f4a 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -166,6 +166,13 @@ typedef struct { } mess_lc_vfs_creat; _ASSERT_MSG_SIZE(mess_lc_vfs_creat); +typedef struct { + int fd; + + uint8_t padding[52]; +} mess_lc_vfs_fchdir; +_ASSERT_MSG_SIZE(mess_lc_vfs_fchdir); + typedef struct { int fd; int cmd; @@ -829,6 +836,7 @@ typedef struct { mess_lc_vfs_chown m_lc_vfs_chown; mess_lc_vfs_creat m_lc_vfs_creat; + mess_lc_vfs_fchdir m_lc_vfs_fchdir; mess_lc_vfs_fcntl m_lc_vfs_fcntl; mess_lc_vfs_fstat m_lc_vfs_fstat; mess_lc_vfs_fsync m_lc_vfs_fsync; diff --git a/lib/libc/sys-minix/chdir.c b/lib/libc/sys-minix/chdir.c index 0554a7097..01d8949a5 100644 --- a/lib/libc/sys-minix/chdir.c +++ b/lib/libc/sys-minix/chdir.c @@ -21,6 +21,6 @@ int fd; message m; memset(&m, 0, sizeof(m)); - m.VFS_FCHDIR_FD = fd; + m.m_lc_vfs_fchdir.fd = fd; return(_syscall(VFS_PROC_NR, VFS_FCHDIR, &m)); } diff --git a/servers/vfs/stadir.c b/servers/vfs/stadir.c index c57de4fd6..f7d8d3ace 100644 --- a/servers/vfs/stadir.c +++ b/servers/vfs/stadir.c @@ -35,7 +35,7 @@ int do_fchdir(void) struct filp *rfilp; int r, rfd; - rfd = job_m_in.VFS_FCHDIR_FD; + rfd = job_m_in.m_lc_vfs_fchdir.fd; /* Is the file descriptor valid? */ if ((rfilp = get_filp(rfd, VNODE_READ)) == NULL) return(err_code);