#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 */
} 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;
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;
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 */
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);