Problem: Currently the usage of `id` shows two unsupported options.

Solution: Remove unsupported options from usage.

Also, simplify a related if condition.

Signed-off-by: Nir Lichtman <[email protected]>
---
 coreutils/id.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/coreutils/id.c b/coreutils/id.c
index a4f178b..2f8f755 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -33,7 +33,7 @@
 /* BB_AUDIT SUSv3 compliant. */
 
 //usage:#define id_trivial_usage
-//usage:       "[-ugGnr"IF_SELINUX("Z")"] [USER]"
+//usage:       "[-ugG"IF_SELINUX("Z")"] [USER]"
 //usage:#define id_full_usage "\n\n"
 //usage:       "Print information about USER or the current user\n"
 //usage:       IF_SELINUX(
@@ -42,8 +42,6 @@
 //usage:     "\n       -u      User ID"
 //usage:     "\n       -g      Group ID"
 //usage:     "\n       -G      Supplementary group IDs"
-//usage:     "\n       -n      Print names instead of numbers"
-//usage:     "\n       -r      Print real ID instead of effective ID"
 //usage:
 //usage:#define id_example_usage
 //usage:       "$ id\n"
@@ -159,7 +157,7 @@ int id_main(int argc UNUSED_PARAM, char **argv)
        security_context_t scontext = NULL;
 #endif
 
-       if (ENABLE_GROUPS && (!ENABLE_ID || applet_name[0] == 'g')) {
+       if (applet_name[0] == 'g') {
                /* TODO: coreutils groups prepend "USER : " prefix,
                 * and accept many usernames. Example:
                 * # groups root root
-- 
2.49.1

_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox

Reply via email to