]> granicus.if.org Git - strace/commitdiff
2005-04-05 Anton Blanchard <anton@samba.org>
authorRoland McGrath <roland@redhat.com>
Mon, 9 May 2005 07:40:33 +0000 (07:40 +0000)
committerRoland McGrath <roland@redhat.com>
Mon, 9 May 2005 07:40:33 +0000 (07:40 +0000)
* 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.

ipc.c

diff --git a/ipc.c b/ipc.c
index 1a264723cb2ead4a03a524ace5107b2103349a83..60fece0d82b7bad826625ecc0edc42eec33e0a15 100644 (file)
--- a/ipc.c
+++ b/ipc.c
@@ -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);
        }