lineedit: do not hang on error, but return error indicator.
[oweals/busybox.git] / coreutils / id.c
index 43f403fa37b6600d32dfddc5ded285e426be8649..56286f4d4558415bcbbe2bc52dbdc61bf53d939d 100644 (file)
@@ -5,7 +5,7 @@
  * Copyright (C) 2000 by Randolph Chung <tausq@debian.org>
  * Copyright (C) 2008 by Tito Ragusa <farmatito@tiscali.it>
  *
- * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ * Licensed under GPLv2 or later, see file LICENSE in this source tree.
  */
 
 /* BB_AUDIT SUSv3 compliant. */
@@ -119,8 +119,8 @@ int id_main(int argc UNUSED_PARAM, char **argv)
        /* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
        /* Don't allow more than one username */
        opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
-                        USE_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
-       opt = getopt32(argv, "rnugG" USE_SELINUX("Z"));
+                        IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
+       opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
 
        username = argv[optind];
        if (username) {
@@ -175,7 +175,7 @@ int id_main(int argc UNUSED_PARAM, char **argv)
                        }
                } else if (n < 0) { /* error in get_groups() */
                        if (!ENABLE_DESKTOP)
-                               bb_error_msg_and_die("cannot get groups");
+                               bb_error_msg_and_die("can't get groups");
                        else
                                return EXIT_FAILURE;
                }