#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* Field names for the mapdriver(2) call. */
-#define VFS_MAPDRIVER_MAJOR m1_i1 /* devmajor_t */
-#define VFS_MAPDRIVER_LABELLEN m1_i2 /* size_t */
-#define VFS_MAPDRIVER_LABEL m1_p1 /* char * */
-
/* Field names for the fsync(2) call. */
#define VFS_FSYNC_FD m1_i1 /* int */
} mess_lsys_vfs_copyfd;
_ASSERT_MSG_SIZE(mess_lsys_vfs_copyfd);
+typedef struct {
+ devmajor_t major;
+ size_t labellen;
+ vir_bytes label;
+
+ uint8_t padding[44];
+} mess_lsys_vfs_mapdriver;
+_ASSERT_MSG_SIZE(mess_lsys_vfs_mapdriver);
+
typedef struct {
dev_t device;
off_t seek_pos;
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
+ mess_lsys_vfs_mapdriver m_lsys_vfs_mapdriver;
mess_vfs_fs_breadwrite m_vfs_fs_breadwrite;
mess_vfs_fs_chmod m_vfs_fs_chmod;
message m;
memset(&m, 0, sizeof(m));
- m.VFS_MAPDRIVER_LABEL = label;
- m.VFS_MAPDRIVER_LABELLEN = strlen(label) + 1;
- m.VFS_MAPDRIVER_MAJOR = major;
+ m.m_lsys_vfs_mapdriver.label = (vir_bytes)label;
+ m.m_lsys_vfs_mapdriver.labellen = strlen(label) + 1;
+ m.m_lsys_vfs_mapdriver.major = major;
return _taskcall(VFS_PROC_NR, VFS_MAPDRIVER, &m);
}
/* Only RS can map drivers. */
if (who_e != RS_PROC_NR) return(EPERM);
- label_vir = (vir_bytes) job_m_in.VFS_MAPDRIVER_LABEL;
- label_len = (size_t) job_m_in.VFS_MAPDRIVER_LABELLEN;
- major = job_m_in.VFS_MAPDRIVER_MAJOR;
+ label_vir = job_m_in.m_lsys_vfs_mapdriver.label;
+ label_len = job_m_in.m_lsys_vfs_mapdriver.labellen;
+ major = job_m_in.m_lsys_vfs_mapdriver.major;
/* Get the label */
if (label_len > sizeof(label)) { /* Can we store this label? */