From: Lionel Sambuc Date: Mon, 12 May 2014 15:16:00 +0000 (+0200) Subject: Message type for VFS_CLOSE X-Git-Tag: v3.3.0~299 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/weatherstation.js?a=commitdiff_plain;h=2101b4ebc0f82d858da9407b8d58fd3dcace7260;p=minix.git Message type for VFS_CLOSE Change-Id: Iebe5f06b0dc95cdca61d95ab875d4fa1171f4f4c --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index cf052dbc9..cb2860183 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 close(2) call. */ -#define VFS_CLOSE_FD m1_i1 /* int */ - /* Field names for the read(2), write(2), and getdents(2) calls. */ #define VFS_READWRITE_FD m1_i1 /* int */ #define VFS_READWRITE_BUF m1_p1 /* char * */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 37bfdfffe..819b9c0e5 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -156,6 +156,13 @@ typedef struct { } mess_lc_vfs_chown; _ASSERT_MSG_SIZE(mess_lc_vfs_chown); +typedef struct { + int fd; + + uint8_t padding[52]; +} mess_lc_vfs_close; +_ASSERT_MSG_SIZE(mess_lc_vfs_close); + typedef struct { vir_bytes name; size_t len; @@ -843,6 +850,7 @@ typedef struct { mess_fs_vfs_readwrite m_fs_vfs_readwrite; mess_lc_vfs_chown m_lc_vfs_chown; + mess_lc_vfs_close m_lc_vfs_close; mess_lc_vfs_creat m_lc_vfs_creat; mess_lc_vfs_fchdir m_lc_vfs_fchdir; mess_lc_vfs_fchmod m_lc_vfs_fchmod; diff --git a/lib/libc/sys-minix/close.c b/lib/libc/sys-minix/close.c index 50a9d152c..f74571bde 100644 --- a/lib/libc/sys-minix/close.c +++ b/lib/libc/sys-minix/close.c @@ -11,6 +11,6 @@ int fd; message m; memset(&m, 0, sizeof(m)); - m.VFS_CLOSE_FD = fd; + m.m_lc_vfs_close.fd = fd; return(_syscall(VFS_PROC_NR, VFS_CLOSE, &m)); } diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 205de3c27..cbe82893d 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -662,7 +662,7 @@ int do_lseek(void) int do_close(void) { /* Perform the close(fd) system call. */ - int thefd = job_m_in.VFS_CLOSE_FD; + int thefd = job_m_in.m_lc_vfs_close.fd; return close_fd(fp, thefd); }