From: Lionel Sambuc Date: Mon, 12 May 2014 11:37:39 +0000 (+0200) Subject: Message type for VFS_UMASK X-Git-Tag: v3.3.0~311 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=74b01e0c2ceefe28f7ae3b2e159fc49a993d1521;p=minix.git Message type for VFS_UMASK Change-Id: Iaf8f83593adbbf50b82feecbe8fad004da2add72 --- diff --git a/include/minix/callnr.h b/include/minix/callnr.h index 4ef3d790a..ad6c92af6 100644 --- a/include/minix/callnr.h +++ b/include/minix/callnr.h @@ -232,9 +232,6 @@ #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. */ #define VFS_LINK_NAME1 m1_p1 /* const char * */ #define VFS_LINK_LEN1 m1_i1 /* size_t */ diff --git a/include/minix/ipc.h b/include/minix/ipc.h index ad8b3fc06..2228bf79e 100644 --- a/include/minix/ipc.h +++ b/include/minix/ipc.h @@ -245,6 +245,13 @@ typedef struct { } 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 { vir_bytes name; size_t namelen; @@ -742,6 +749,7 @@ typedef struct { mess_lc_vfs_select m_lc_vfs_select; mess_lc_vfs_statvfs1 m_lc_vfs_statvfs1; 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_lsys_vfs_checkperms m_lsys_vfs_checkperms; diff --git a/lib/libc/sys-minix/umask.c b/lib/libc/sys-minix/umask.c index aa2d372ed..29d141367 100644 --- a/lib/libc/sys-minix/umask.c +++ b/lib/libc/sys-minix/umask.c @@ -10,6 +10,6 @@ mode_t umask(mode_t complmode) message 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)); } diff --git a/servers/vfs/protect.c b/servers/vfs/protect.c index aab23d207..9beaecce7 100644 --- a/servers/vfs/protect.c +++ b/servers/vfs/protect.c @@ -184,7 +184,7 @@ int do_umask(void) /* Perform the umask(2) system call. */ 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 */ fp->fp_umask = ~(new_umask & RWX_MODES);