Redo mount(2)/umount(2) ABI
- pass in file system type through mount(2), and return this type in statvfs structures as generated by [f]statvfs(2); - align mount flags field with NetBSD's, splitting out service flags which are not to be passed to VFS; - remove limitation of mount ABI to 16-byte labels, so that labels can be made larger in the future; - introduce new m11 message union type for mount(2) as side effect. Change-Id: I88b7710e297e00a5e4582ada5243d3d5c2801fd9
This commit is contained in:
@@ -911,6 +911,23 @@
|
||||
#define STATVFS_NAME m1_p1
|
||||
#define STATVFS_BUF m1_p2
|
||||
|
||||
/* Field names for the mount(2) call. */
|
||||
#define VFS_MOUNT_FLAGS m11_i1
|
||||
#define VFS_MOUNT_DEVLEN m11_s1
|
||||
#define VFS_MOUNT_PATHLEN m11_s2
|
||||
#define VFS_MOUNT_TYPELEN m11_s3
|
||||
#define VFS_MOUNT_LABELLEN m11_s4
|
||||
#define VFS_MOUNT_DEV m11_p1
|
||||
#define VFS_MOUNT_PATH m11_p2
|
||||
#define VFS_MOUNT_TYPE m11_p3
|
||||
#define VFS_MOUNT_LABEL m11_p4
|
||||
|
||||
/* Field names for the umount(2) call. */
|
||||
#define VFS_UMOUNT_NAME m1_p1
|
||||
#define VFS_UMOUNT_NAMELEN m1_i1
|
||||
#define VFS_UMOUNT_LABEL m1_p2
|
||||
#define VFS_UMOUNT_LABELLEN m1_i2
|
||||
|
||||
/*===========================================================================*
|
||||
* Messages for VM server *
|
||||
*===========================================================================*/
|
||||
|
||||
@@ -29,6 +29,8 @@ typedef struct {long m9l1, m9l2, m9l3, m9l4, m9l5;
|
||||
short m9s1, m9s2, m9s3, m9s4; } mess_9;
|
||||
typedef struct {int m10i1, m10i2, m10i3, m10i4;
|
||||
long m10l1, m10l2, m10l3; } mess_10;
|
||||
typedef struct {int m11i1; short m11s1, m11s2, m11s3, m11s4;
|
||||
char *m11p1, *m11p2, *m11p3, *m11p4; } mess_11;
|
||||
|
||||
typedef struct {
|
||||
void *block;
|
||||
@@ -68,6 +70,7 @@ typedef struct {
|
||||
mess_6 m_m6;
|
||||
mess_9 m_m9;
|
||||
mess_10 m_m10;
|
||||
mess_11 m_m11;
|
||||
mess_vmmcp m_vmmcp;
|
||||
mess_vmmcp_reply m_vmmcp_reply;
|
||||
mess_vm_vfs_mmap m_vm_vfs;
|
||||
@@ -154,6 +157,16 @@ typedef struct {
|
||||
#define m10_l2 m_u.m_m10.m10l2
|
||||
#define m10_l3 m_u.m_m10.m10l3
|
||||
|
||||
#define m11_i1 m_u.m_m11.m11i1
|
||||
#define m11_s1 m_u.m_m11.m11s1
|
||||
#define m11_s2 m_u.m_m11.m11s2
|
||||
#define m11_s3 m_u.m_m11.m11s3
|
||||
#define m11_s4 m_u.m_m11.m11s4
|
||||
#define m11_p1 m_u.m_m11.m11p1
|
||||
#define m11_p2 m_u.m_m11.m11p2
|
||||
#define m11_p3 m_u.m_m11.m11p3
|
||||
#define m11_p4 m_u.m_m11.m11p4
|
||||
|
||||
/*==========================================================================*
|
||||
* Minix run-time system (IPC). *
|
||||
*==========================================================================*/
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
#ifndef _MOUNT_H
|
||||
#define _MOUNT_H
|
||||
|
||||
#define MS_RDONLY 0x001 /* Mount device read only */
|
||||
#define MS_REUSE 0x002 /* Tell RS to try reusing binary from memory */
|
||||
#define MS_LABEL16 0x004 /* Mount message points to 16-byte label */
|
||||
#define MS_EXISTING 0x008 /* Tell mount to use already running server */
|
||||
/* Service flags. These are not passed to VFS. */
|
||||
#define MS_REUSE 0x001 /* Tell RS to try reusing binary from memory */
|
||||
#define MS_EXISTING 0x002 /* Tell mount to use already running server */
|
||||
|
||||
/* Legacy definitions. */
|
||||
#define MNTNAMELEN 16 /* Length of fs type name including nul */
|
||||
#define MNTFLAGLEN 64 /* Length of flags string including nul */
|
||||
|
||||
int mount(char *_spec, char *_name, int _mountflags, char *type, char
|
||||
*args);
|
||||
int umount(const char *_name);
|
||||
int umount2(const char *_name, int flags);
|
||||
int mount(char *_spec, char *_name, int _mountflags, int srvflags, char *type,
|
||||
char *args);
|
||||
int umount(const char *_name, int srvflags);
|
||||
|
||||
#endif /* _MOUNT_H */
|
||||
|
||||
Reference in New Issue
Block a user