Message type for VFS_MKNOD
Change-Id: Ief8c6664d79c320a70543c10b758b784fdfa7cfd
This commit is contained in:
parent
6d903b914c
commit
96b3577b2c
4 changed files with 20 additions and 14 deletions
|
@ -232,12 +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 mknod(2) call. */
|
|
||||||
#define VFS_MKNOD_NAME m1_p1 /* const char * */
|
|
||||||
#define VFS_MKNOD_LEN m1_i1 /* size_t */
|
|
||||||
#define VFS_MKNOD_MODE m1_i2 /* mode_t */
|
|
||||||
#define VFS_MKNOD_DEV m1_ull1 /* dev_t */
|
|
||||||
|
|
||||||
/* Field names for the open(2), chdir(2), chmod(2), chroot(2), rmdir(2), and
|
/* Field names for the open(2), chdir(2), chmod(2), chroot(2), rmdir(2), and
|
||||||
* unlink(2) calls.
|
* unlink(2) calls.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -216,6 +216,17 @@ typedef struct {
|
||||||
} mess_vfs_lc_lseek;
|
} mess_vfs_lc_lseek;
|
||||||
_ASSERT_MSG_SIZE(mess_vfs_lc_lseek);
|
_ASSERT_MSG_SIZE(mess_vfs_lc_lseek);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
dev_t device;
|
||||||
|
|
||||||
|
vir_bytes name;
|
||||||
|
size_t len;
|
||||||
|
mode_t mode;
|
||||||
|
|
||||||
|
uint8_t padding[36];
|
||||||
|
} mess_lc_vfs_mknod;
|
||||||
|
_ASSERT_MSG_SIZE(mess_lc_vfs_mknod);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int flags;
|
int flags;
|
||||||
size_t devlen;
|
size_t devlen;
|
||||||
|
@ -794,6 +805,7 @@ typedef struct {
|
||||||
mess_lc_vfs_ioctl m_lc_vfs_ioctl;
|
mess_lc_vfs_ioctl m_lc_vfs_ioctl;
|
||||||
mess_lc_vfs_link m_lc_vfs_link;
|
mess_lc_vfs_link m_lc_vfs_link;
|
||||||
mess_lc_vfs_lseek m_lc_vfs_lseek;
|
mess_lc_vfs_lseek m_lc_vfs_lseek;
|
||||||
|
mess_lc_vfs_mknod m_lc_vfs_mknod;
|
||||||
mess_lc_vfs_mount m_lc_vfs_mount;
|
mess_lc_vfs_mount m_lc_vfs_mount;
|
||||||
mess_lc_vfs_pipe2 m_lc_vfs_pipe2;
|
mess_lc_vfs_pipe2 m_lc_vfs_pipe2;
|
||||||
mess_lc_vfs_readlink m_lc_vfs_readlink;
|
mess_lc_vfs_readlink m_lc_vfs_readlink;
|
||||||
|
|
|
@ -12,10 +12,10 @@ int mknod(const char *name, mode_t mode, dev_t dev)
|
||||||
message m;
|
message m;
|
||||||
|
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.VFS_MKNOD_LEN = strlen(name) + 1;
|
m.m_lc_vfs_mknod.len = strlen(name) + 1;
|
||||||
m.VFS_MKNOD_MODE = mode;
|
m.m_lc_vfs_mknod.mode = mode;
|
||||||
m.VFS_MKNOD_DEV = dev;
|
m.m_lc_vfs_mknod.device = dev;
|
||||||
m.VFS_MKNOD_NAME = (char *) __UNCONST(name);
|
m.m_lc_vfs_mknod.name = (vir_bytes)name;
|
||||||
return(_syscall(VFS_PROC_NR, VFS_MKNOD, &m));
|
return(_syscall(VFS_PROC_NR, VFS_MKNOD, &m));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -513,10 +513,10 @@ int do_mknod(void)
|
||||||
size_t vname1_length;
|
size_t vname1_length;
|
||||||
dev_t dev;
|
dev_t dev;
|
||||||
|
|
||||||
vname1 = (vir_bytes) job_m_in.VFS_MKNOD_NAME;
|
vname1 = job_m_in.m_lc_vfs_mknod.name;
|
||||||
vname1_length = (size_t) job_m_in.VFS_MKNOD_LEN;
|
vname1_length = job_m_in.m_lc_vfs_mknod.len;
|
||||||
mode_bits = (mode_t) job_m_in.VFS_MKNOD_MODE;
|
mode_bits = job_m_in.m_lc_vfs_mknod.mode;
|
||||||
dev = job_m_in.VFS_MKNOD_DEV;
|
dev = job_m_in.m_lc_vfs_mknod.device;
|
||||||
|
|
||||||
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &vmp, &vp);
|
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &vmp, &vp);
|
||||||
resolve.l_vmnt_lock = VMNT_WRITE;
|
resolve.l_vmnt_lock = VMNT_WRITE;
|
||||||
|
|
Loading…
Reference in a new issue