]> Zhao Yanbai Git Server - minix.git/commitdiff
Message type for VFS_UMOUNT
authorLionel Sambuc <lionel@minix3.org>
Mon, 12 May 2014 10:44:59 +0000 (12:44 +0200)
committerLionel Sambuc <lionel@minix3.org>
Mon, 28 Jul 2014 15:05:31 +0000 (17:05 +0200)
Change-Id: Ia3b8e818b45a31178215cad77fa0fa3e5325f18a

include/minix/callnr.h
include/minix/ipc.h
lib/libc/sys-minix/mount.c
servers/vfs/mount.c

index c70f2e2574798d6982247d54265858df1e529714..5c91e70e453ace84b70d773361a29bf2b16830a7 100644 (file)
 
 #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 */
index 8d53d647c5ec515f5c2666abde8802fa5e12f6e0..5d56726ee121945e27221f87b7402319b75f234c 100644 (file)
@@ -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;
index 1a2dd69027820b34cc7b961fcfdf3c35989ce1e2..6e2703d46b91b30045e9b7825bf6fa8146cb4b3a 100644 (file)
@@ -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 */      
index 59ddf547e819b4da3104d09cdfa26a1fe4ccacbb..350dfc95c70325fd905de0eddc62f73b415754bc 100644 (file)
@@ -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);