Message type for VFS_UMASK
Change-Id: Iaf8f83593adbbf50b82feecbe8fad004da2add72
This commit is contained in:
parent
3bae8fe45a
commit
74b01e0c2c
4 changed files with 10 additions and 5 deletions
|
@ -232,9 +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 umask(2) call. */
|
|
||||||
#define VFS_UMASK_MASK m1_i1 /* mode_t */
|
|
||||||
|
|
||||||
/* Field names for the link(2), symlink(2), and rename(2) call. */
|
/* Field names for the link(2), symlink(2), and rename(2) call. */
|
||||||
#define VFS_LINK_NAME1 m1_p1 /* const char * */
|
#define VFS_LINK_NAME1 m1_p1 /* const char * */
|
||||||
#define VFS_LINK_LEN1 m1_i1 /* size_t */
|
#define VFS_LINK_LEN1 m1_i1 /* size_t */
|
||||||
|
|
|
@ -245,6 +245,13 @@ typedef struct {
|
||||||
} mess_lc_vfs_truncate;
|
} mess_lc_vfs_truncate;
|
||||||
_ASSERT_MSG_SIZE(mess_lc_vfs_truncate);
|
_ASSERT_MSG_SIZE(mess_lc_vfs_truncate);
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
mode_t mask;
|
||||||
|
|
||||||
|
uint8_t padding[52];
|
||||||
|
} mess_lc_vfs_umask;
|
||||||
|
_ASSERT_MSG_SIZE(mess_lc_vfs_umask);
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
vir_bytes name;
|
vir_bytes name;
|
||||||
size_t namelen;
|
size_t namelen;
|
||||||
|
@ -742,6 +749,7 @@ typedef struct {
|
||||||
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;
|
||||||
mess_lc_vfs_truncate m_lc_vfs_truncate;
|
mess_lc_vfs_truncate m_lc_vfs_truncate;
|
||||||
|
mess_lc_vfs_umask m_lc_vfs_umask;
|
||||||
mess_lc_vfs_umount m_lc_vfs_umount;
|
mess_lc_vfs_umount m_lc_vfs_umount;
|
||||||
|
|
||||||
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
|
mess_lsys_vfs_checkperms m_lsys_vfs_checkperms;
|
||||||
|
|
|
@ -10,6 +10,6 @@ mode_t umask(mode_t complmode)
|
||||||
message m;
|
message m;
|
||||||
|
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
m.VFS_UMASK_MASK = complmode;
|
m.m_lc_vfs_umask.mask = complmode;
|
||||||
return( (mode_t) _syscall(VFS_PROC_NR, VFS_UMASK, &m));
|
return( (mode_t) _syscall(VFS_PROC_NR, VFS_UMASK, &m));
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,7 +184,7 @@ int do_umask(void)
|
||||||
/* Perform the umask(2) system call. */
|
/* Perform the umask(2) system call. */
|
||||||
mode_t complement, new_umask;
|
mode_t complement, new_umask;
|
||||||
|
|
||||||
new_umask = job_m_in.VFS_UMASK_MASK;
|
new_umask = job_m_in.m_lc_vfs_umask.mask;
|
||||||
|
|
||||||
complement = ~fp->fp_umask; /* set 'r' to complement of old mask */
|
complement = ~fp->fp_umask; /* set 'r' to complement of old mask */
|
||||||
fp->fp_umask = ~(new_umask & RWX_MODES);
|
fp->fp_umask = ~(new_umask & RWX_MODES);
|
||||||
|
|
Loading…
Reference in a new issue