#define NR_VFS_CALLS 49 /* highest number from base plus one */
-/* Field names for the chown(2) and fchown(2) calls. */
-#define VFS_CHOWN_NAME m1_p1 /* const char * */
-#define VFS_CHOWN_LEN m1_i1 /* size_t */
-#define VFS_CHOWN_FD m1_i1 /* int */
-#define VFS_CHOWN_OWNER m1_i2 /* uid_t */
-#define VFS_CHOWN_GROUP m1_i3 /* gid_t */
-
/* Field names for the fchdir(2) call. */
#define VFS_FCHDIR_FD m1_i1 /* int */
} mess_sigcalls;
_ASSERT_MSG_SIZE(mess_sigcalls);
+typedef struct {
+ vir_bytes name;
+ size_t len;
+ int fd;
+ uid_t owner;
+ gid_t group;
+
+ uint8_t padding[36];
+} mess_lc_vfs_chown;
+_ASSERT_MSG_SIZE(mess_lc_vfs_chown);
+
typedef struct {
vir_bytes name;
size_t len;
mess_fs_vfs_readsuper m_fs_vfs_readsuper;
mess_fs_vfs_readwrite m_fs_vfs_readwrite;
+ mess_lc_vfs_chown m_lc_vfs_chown;
mess_lc_vfs_creat m_lc_vfs_creat;
mess_lc_vfs_fcntl m_lc_vfs_fcntl;
mess_lc_vfs_fstat m_lc_vfs_fstat;
message m;
memset(&m, 0, sizeof(m));
- m.VFS_CHOWN_LEN = strlen(name) + 1;
- m.VFS_CHOWN_OWNER = owner;
- m.VFS_CHOWN_GROUP = grp;
- m.VFS_CHOWN_NAME = (char *) __UNCONST(name);
+ m.m_lc_vfs_chown.len = strlen(name) + 1;
+ m.m_lc_vfs_chown.owner = owner;
+ m.m_lc_vfs_chown.group = grp;
+ m.m_lc_vfs_chown.name = (vir_bytes)name;
return(_syscall(VFS_PROC_NR, VFS_CHOWN, &m));
}
message m;
memset(&m, 0, sizeof(m));
- m.VFS_CHOWN_FD = fd;
- m.VFS_CHOWN_OWNER = owner;
- m.VFS_CHOWN_GROUP = grp;
+ m.m_lc_vfs_chown.fd = fd;
+ m.m_lc_vfs_chown.owner = owner;
+ m.m_lc_vfs_chown.group = grp;
return(_syscall(VFS_PROC_NR, VFS_FCHOWN, &m));
}
size_t vname1_length;
flp = NULL;
- uid = job_m_in.VFS_CHOWN_OWNER;
- gid = job_m_in.VFS_CHOWN_GROUP;
+ uid = job_m_in.m_lc_vfs_chown.owner;
+ gid = job_m_in.m_lc_vfs_chown.group;
if (job_call_nr == VFS_CHOWN) {
- vname1 = (vir_bytes) job_m_in.VFS_CHOWN_NAME;
- vname1_length = (size_t) job_m_in.VFS_CHOWN_LEN;
+ vname1 = job_m_in.m_lc_vfs_chown.name;
+ vname1_length = job_m_in.m_lc_vfs_chown.len;
lookup_init(&resolve, fullpath, PATH_NOFLAGS, &vmp, &vp);
resolve.l_vmnt_lock = VMNT_READ;
return(err_code);
if ((vp = eat_path(&resolve, fp)) == NULL) return(err_code);
} else { /* call_nr == VFS_FCHOWN */
- rfd = job_m_in.VFS_CHOWN_FD;
+ rfd = job_m_in.m_lc_vfs_chown.fd;
/* File is already opened; get a pointer to the vnode from filp. */
if ((flp = get_filp(rfd, VNODE_WRITE)) == NULL)