]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsipc: the default --global is mutually exclusive with -c --id and -t
authorKarel Zak <kzak@redhat.com>
Thu, 23 Jul 2015 08:36:02 +0000 (10:36 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Jul 2015 08:36:02 +0000 (10:36 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/lsipc.c

index 25dd0f3f24fb4b1d1ffdb855652539708d0e75fd..8912c8da4fd6bbd0c446869f3953d239b819ef5b 100644 (file)
@@ -1257,9 +1257,11 @@ int main(int argc, char *argv[])
        }
 
        /* default is global */
-       if (msg + shm + sem == 0)
+       if (msg + shm + sem == 0) {
                msg = shm = sem = global = 1;
-
+               if (show_time || show_creat || id)
+                       errx(EXIT_FAILURE, _("the --global is mutually exclusive with --creator, --id and --time"));
+       }
        if (global) {
                add_column(columns, ncolumns++, COL_RESOURCE);
                add_column(columns, ncolumns++, COL_DESC);