Message type for VFS_COPYFD
Change-Id: I7aff1b9551d3a60b2191de1bac3b695ea06b73ce
This commit is contained in:
parent
8830643ac3
commit
6fb0c605fd
4 changed files with 16 additions and 11 deletions
|
@ -232,11 +232,6 @@
|
|||
|
||||
#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 */
|
||||
|
|
|
@ -220,6 +220,15 @@ typedef struct {
|
|||
} 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;
|
||||
|
@ -679,6 +688,7 @@ typedef struct {
|
|||
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;
|
||||
|
|
|
@ -8,9 +8,9 @@ copyfd(endpoint_t endpt, int fd, int what)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -428,9 +428,9 @@ int do_copyfd(void)
|
|||
/* 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];
|
||||
|
|
Loading…
Reference in a new issue