From 9ceebd7a4bd93adfbca12066c2eccd0863c6b7a2 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Mon, 12 May 2014 13:07:11 +0200 Subject: [PATCH] Message type for VFS_FSYNC Change-Id: Iae9d27dbf40bc5567de6c5960f5cbe174be00dbd --- include/minix/callnr.h | 3 --- include/minix/ipc.h | 8 ++++++++ lib/libc/sys-minix/fsync.c | 2 +- servers/vfs/misc.c | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 4fe328bf7..e54953c4a 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 fsync(2) call. */ -#define VFS_FSYNC_FD m1_i1 /* int */ - /* Field names for the lseek(2) call. */ #define VFS_LSEEK_FD m2_i1 /* int */ #define VFS_LSEEK_OFF m2_ll1 /* off_t */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index f25dcd944..6914f894c 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -146,6 +146,13 @@ typedef struct { } mess_sigcalls; _ASSERT_MSG_SIZE(mess_sigcalls); +typedef struct { + int fd; + + uint8_t padding[52]; +} mess_lc_vfs_fsync; +_ASSERT_MSG_SIZE(mess_lc_vfs_fsync); + typedef struct { int32_t flags; size_t len; @@ -689,6 +696,7 @@ typedef struct { mess_fs_vfs_readsuper m_fs_vfs_readsuper; mess_fs_vfs_readwrite m_fs_vfs_readwrite; + mess_lc_vfs_fsync m_lc_vfs_fsync; mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat; mess_lc_vfs_ioctl m_lc_vfs_ioctl; mess_lc_vfs_mount m_lc_vfs_mount; diff --git a/lib/libc/sys-minix/fsync.c b/lib/libc/sys-minix/fsync.c index 6297e247d..915111628 100644 --- a/lib/libc/sys-minix/fsync.c +++ b/lib/libc/sys-minix/fsync.c @@ -10,7 +10,7 @@ int fsync(int fd) message m; memset(&m, 0, sizeof(m)); - m.VFS_FSYNC_FD = fd; + m.m_lc_vfs_fsync.fd = fd; return(_syscall(VFS_PROC_NR, VFS_FSYNC, &m)); } diff --git a/servers/vfs/misc.c b/servers/vfs/misc.c index 7ab76b072..0775a4b4e 100644 --- a/servers/vfs/misc.c +++ b/servers/vfs/misc.c @@ -281,7 +281,7 @@ int do_fsync(void) dev_t dev; int r = OK; - scratch(fp).file.fd_nr = job_m_in.VFS_FSYNC_FD; + scratch(fp).file.fd_nr = job_m_in.m_lc_vfs_fsync.fd; if ((rfilp = get_filp(scratch(fp).file.fd_nr, VNODE_READ)) == NULL) return(err_code); -- 2.44.0