Message type for VFS_IOCTL
Change-Id: Ibea0fd2f443c1332bf1c9d138840d838bfc81d81
This commit is contained in:
parent
a16ccbaaf8
commit
a57fc8f683
4 changed files with 16 additions and 11 deletions
|
@ -232,11 +232,6 @@
|
||||||
|
|
||||||
#define NR_VFS_CALLS 49 /* highest number from base plus one */
|
#define NR_VFS_CALLS 49 /* highest number from base plus one */
|
||||||
|
|
||||||
/* Field names for the ioctl(2) call. */
|
|
||||||
#define VFS_IOCTL_FD m2_i1 /* int */
|
|
||||||
#define VFS_IOCTL_REQ m2_i3 /* unsigned long */
|
|
||||||
#define VFS_IOCTL_ARG m2_p1 /* void * */
|
|
||||||
|
|
||||||
/* Field names for the checkperms(2) call. */
|
/* Field names for the checkperms(2) call. */
|
||||||
#define VFS_CHECKPERMS_ENDPT m2_i1 /* endpoint_t */
|
#define VFS_CHECKPERMS_ENDPT m2_i1 /* endpoint_t */
|
||||||
#define VFS_CHECKPERMS_GRANT m2_i2 /* cp_grant_id_t */
|
#define VFS_CHECKPERMS_GRANT m2_i2 /* cp_grant_id_t */
|
||||||
|
|
|
@ -155,6 +155,15 @@ typedef struct {
|
||||||
} mess_lc_vfs_getvfsstat;
|
} mess_lc_vfs_getvfsstat;
|
||||||
_ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat);
|
_ASSERT_MSG_SIZE(mess_lc_vfs_getvfsstat);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
int fd;
|
||||||
|
unsigned long req;
|
||||||
|
void *arg;
|
||||||
|
|
||||||
|
uint8_t padding[44];
|
||||||
|
} mess_lc_vfs_ioctl;
|
||||||
|
_ASSERT_MSG_SIZE(mess_lc_vfs_ioctl);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int flags;
|
int flags;
|
||||||
size_t devlen;
|
size_t devlen;
|
||||||
|
@ -654,6 +663,7 @@ typedef struct {
|
||||||
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
|
||||||
|
|
||||||
mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
|
mess_lc_vfs_getvfsstat m_lc_vfs_getvfsstat;
|
||||||
|
mess_lc_vfs_ioctl m_lc_vfs_ioctl;
|
||||||
mess_lc_vfs_mount m_lc_vfs_mount;
|
mess_lc_vfs_mount m_lc_vfs_mount;
|
||||||
mess_lc_vfs_select m_lc_vfs_select;
|
mess_lc_vfs_select m_lc_vfs_select;
|
||||||
mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
|
mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1;
|
||||||
|
|
|
@ -76,9 +76,9 @@ int ioctl(int fd, unsigned long request, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.VFS_IOCTL_FD = fd;
|
m.m_lc_vfs_ioctl.fd = fd;
|
||||||
m.VFS_IOCTL_REQ = request;
|
m.m_lc_vfs_ioctl.req = request;
|
||||||
m.VFS_IOCTL_ARG = (char *) addr;
|
m.m_lc_vfs_ioctl.arg = addr;
|
||||||
|
|
||||||
r = _syscall(VFS_PROC_NR, VFS_IOCTL, &m);
|
r = _syscall(VFS_PROC_NR, VFS_IOCTL, &m);
|
||||||
|
|
||||||
|
|
|
@ -492,9 +492,9 @@ int do_ioctl(void)
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
void *argx;
|
void *argx;
|
||||||
|
|
||||||
scratch(fp).file.fd_nr = job_m_in.VFS_IOCTL_FD;
|
scratch(fp).file.fd_nr = job_m_in.m_lc_vfs_ioctl.fd;
|
||||||
ioctlrequest = job_m_in.VFS_IOCTL_REQ;
|
ioctlrequest = job_m_in.m_lc_vfs_ioctl.req;
|
||||||
argx = job_m_in.VFS_IOCTL_ARG;
|
argx = job_m_in.m_lc_vfs_ioctl.arg;
|
||||||
|
|
||||||
if ((f = get_filp(scratch(fp).file.fd_nr, VNODE_READ)) == NULL)
|
if ((f = get_filp(scratch(fp).file.fd_nr, VNODE_READ)) == NULL)
|
||||||
return(err_code);
|
return(err_code);
|
||||||
|
|
Loading…
Reference in a new issue