From: Lionel Sambuc Date: Mon, 12 May 2014 10:44:59 +0000 (+0200) Subject: Message type for VFS_UMOUNT X-Git-Tag: v3.3.0~320 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/dnssec-revoke.html?a=commitdiff_plain;h=a16ccbaaf8865c3e7b9b29a9cbd9e1f452495d36;p=minix.git Message type for VFS_UMOUNT Change-Id: Ia3b8e818b45a31178215cad77fa0fa3e5325f18a --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index c70f2e257..5c91e70e4 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -232,12 +232,6 @@ #define NR_VFS_CALLS 49 /* highest number from base plus one */ -/* Field names for the umount(2) call. */ -#define VFS_UMOUNT_NAME m1_p1 /* char * */ -#define VFS_UMOUNT_NAMELEN m1_i1 /* size_t */ -#define VFS_UMOUNT_LABEL m1_p2 /* char * */ -#define VFS_UMOUNT_LABELLEN m1_i2 /* size_t */ - /* Field names for the ioctl(2) call. */ #define VFS_IOCTL_FD m2_i1 /* int */ #define VFS_IOCTL_REQ m2_i3 /* unsigned long */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index 8d53d647c..5d56726ee 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -192,6 +192,16 @@ typedef struct { } mess_lc_vfs_statvfs1; _ASSERT_MSG_SIZE(mess_lc_vfs_statvfs1); +typedef struct { + vir_bytes name; + size_t namelen; + vir_bytes label; + size_t labellen; + + uint8_t padding[40]; +} mess_lc_vfs_umount; +_ASSERT_MSG_SIZE(mess_lc_vfs_umount); + typedef struct { dev_t device; off_t seek_pos; @@ -647,6 +657,7 @@ typedef struct { mess_lc_vfs_mount m_lc_vfs_mount; mess_lc_vfs_select m_lc_vfs_select; mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1; + mess_lc_vfs_umount m_lc_vfs_umount; mess_vfs_fs_breadwrite m_vfs_fs_breadwrite; mess_vfs_fs_chmod m_vfs_fs_chmod; diff --git a/lib/libc/sys-minix/mount.c b/lib/libc/sys-minix/mount.c index 1a2dd6902..6e2703d46 100644 --- a/lib/libc/sys-minix/mount.c +++ b/lib/libc/sys-minix/mount.c @@ -172,10 +172,10 @@ int minix_umount(const char *name, int srvflags) int r; memset(&m, 0, sizeof(m)); - m.VFS_UMOUNT_NAME = __UNCONST(name); - m.VFS_UMOUNT_NAMELEN = strlen(name) + 1; - m.VFS_UMOUNT_LABEL = label; - m.VFS_UMOUNT_LABELLEN = sizeof(label); + m.m_lc_vfs_umount.name = (vir_bytes)name; + m.m_lc_vfs_umount.namelen = strlen(name) + 1; + m.m_lc_vfs_umount.label = (vir_bytes)label; + m.m_lc_vfs_umount.labellen = sizeof(label); r = _syscall(VFS_PROC_NR, VFS_UMOUNT, &m); /* don't shut down the driver when exist flag is set */ diff --git a/servers/vfs/mount.c b/servers/vfs/mount.c index 59ddf547e..350dfc95c 100644 --- a/servers/vfs/mount.c +++ b/servers/vfs/mount.c @@ -425,10 +425,10 @@ int do_umount(void) vir_bytes vname, label_addr; size_t vname_length, label_len; - vname = (vir_bytes) job_m_in.VFS_UMOUNT_NAME; - vname_length = (size_t) job_m_in.VFS_UMOUNT_NAMELEN; - label_addr = (vir_bytes) job_m_in.VFS_UMOUNT_LABEL; - label_len = (size_t) job_m_in.VFS_UMOUNT_LABELLEN; + vname = job_m_in.m_lc_vfs_umount.name; + vname_length = job_m_in.m_lc_vfs_umount.namelen; + label_addr = job_m_in.m_lc_vfs_umount.label; + label_len = job_m_in.m_lc_vfs_umount.labellen; /* Only the super-user may do umount. */ if (!super_user) return(EPERM);