#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* Field names for the copyfd(2) call. */
-#define VFS_COPYFD_ENDPT m1_i1 /* endpoint_t */
-#define VFS_COPYFD_FD m1_i2 /* int */
-#define VFS_COPYFD_WHAT m1_i3 /* int */
-
/* Field names for the mapdriver(2) call. */
#define VFS_MAPDRIVER_MAJOR m1_i1 /* devmajor_t */
#define VFS_MAPDRIVER_LABELLEN m1_i2 /* size_t */
} mess_lsys_vfs_checkperms;
_ASSERT_MSG_SIZE(mess_lsys_vfs_checkperms);
+typedef struct {
+ endpoint_t endpt;
+ int fd;
+ int what;
+
+ uint8_t padding[44];
+} mess_lsys_vfs_copyfd;
+_ASSERT_MSG_SIZE(mess_lsys_vfs_copyfd);
+
typedef struct {
dev_t device;
off_t seek_pos;
mess_lc_vfs_umount m_lc_vfs_umount;
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
+ mess_lsys_vfs_copyfd m_lsys_vfs_copyfd;
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_COPYFD_ENDPT = endpt;
- m.VFS_COPYFD_FD = fd;
- m.VFS_COPYFD_WHAT = what;
+ m.m_lsys_vfs_copyfd.endpt = endpt;
+ m.m_lsys_vfs_copyfd.fd = fd;
+ m.m_lsys_vfs_copyfd.what = what;
return _taskcall(VFS_PROC_NR, VFS_COPYFD, &m);
}
/* This should be replaced with an ACL check. */
if (!super_user) return(EPERM);
- endpt = (endpoint_t) job_m_in.VFS_COPYFD_ENDPT;
- fd = job_m_in.VFS_COPYFD_FD;
- what = job_m_in.VFS_COPYFD_WHAT;
+ endpt = job_m_in.m_lsys_vfs_copyfd.endpt;
+ fd = job_m_in.m_lsys_vfs_copyfd.fd;
+ what = job_m_in.m_lsys_vfs_copyfd.what;
if (isokendpt(endpt, &slot) != OK) return(EINVAL);
rfp = &fproc[slot];