2005-04-05 Anton Blanchard <anton@samba.org>

* ipc.c (shm_resource_flags): New variable, table has SHM_HUGETLB
	but not IPC_NOWAIT, which have the same value.
	(sys_shmget): Use that instead of resource_flags.
This commit is contained in:
Roland McGrath 2005-05-09 07:40:33 +00:00
parent ad81dce78f
commit 802b8f41dc

8
ipc.c
View File

@ -123,6 +123,12 @@ static const struct xlat resource_flags[] = {
{ IPC_CREAT, "IPC_CREAT" },
{ IPC_EXCL, "IPC_EXCL" },
{ IPC_NOWAIT, "IPC_NOWAIT" },
{ 0, NULL },
};
static const struct xlat shm_resource_flags[] = {
{ IPC_CREAT, "IPC_CREAT" },
{ IPC_EXCL, "IPC_EXCL" },
#ifdef SHM_HUGETLB
{ SHM_HUGETLB, "SHM_HUGETLB" },
#endif
@ -325,7 +331,7 @@ struct tcb *tcp;
tprintf("IPC_PRIVATE");
tprintf(", %lu", tcp->u_arg[1]);
tprintf(", ");
if (printflags(resource_flags, tcp->u_arg[2] & ~0777) != 0)
if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777) != 0)
tprintf("|");
tprintf("%#lo", tcp->u_arg[2] & 0777);
}