Update internal.h to conditionally include asm/string.h
[oweals/busybox.git] / id.c
diff --git a/id.c b/id.c
index 542f86566fc3247ac7f9ad1da427decff2b624f4..69dfe2658c855a5ef7c0be767ca5c3d64b6b90bd 100644 (file)
--- a/id.c
+++ b/id.c
@@ -32,6 +32,7 @@ static const char id_usage[] =
        "id [OPTIONS]... [USERNAME]\n"
 #ifndef BB_FEATURE_TRIVIAL_HELP
        "\nPrint information for USERNAME or the current user\n\n"
+       "Options:\n"
        "\t-g\tprints only the group ID\n"
        "\t-u\tprints only the user ID\n"
        "\t-r\tprints the real user ID instead of the effective ID (with -ug)\n\n"
@@ -42,7 +43,7 @@ extern int id_main(int argc, char **argv)
 {
        int no_user = 0, no_group = 0, print_real = 0;
        char *cp, *user, *group;
-       gid_t gid;
+       unsigned long gid;
        
        cp = user = group = NULL;
 
@@ -81,14 +82,14 @@ extern int id_main(int argc, char **argv)
                my_getgrgid(group, gid);
        }
 
-       if (no_group) printf("%u\n", my_getpwnam(user));
-       else if (no_user) printf("%u\n", my_getgrnam(group));
+       if (no_group) printf("%lu\n", my_getpwnam(user));
+       else if (no_user) printf("%lu\n", my_getgrnam(group));
        else
-               printf("uid=%u(%s) gid=%u(%s)\n",
+               printf("uid=%lu(%s) gid=%lu(%s)\n",
                           my_getpwnam(user), user, my_getgrnam(group), group);
        
 
-       exit(0);
+       return(0);
 }