Exit with failure status if we are unable to list any files or
[oweals/busybox.git] / coreutils / whoami.c
index f9d3f286a995678b324d50081c4bc4628be2b96f..f3c21b3f5a89886b49fee8ca2d219afa2fe81774 100644 (file)
  *
  */
 
-#include "internal.h"
+#include "busybox.h"
 #include <stdio.h>
 #include <pwd.h>
 
-static const char whoami_usage[] = "whoami\n\n"
-       "Prints the user name associated with the current effective user id.\n";
-
 extern int whoami_main(int argc, char **argv)
 {
        char *user = xmalloc(9);
@@ -40,7 +37,6 @@ extern int whoami_main(int argc, char **argv)
                puts(user);
                exit(TRUE);
        }
-       fprintf(stderr, "%s: cannot find username for UID %u\n", argv[0],
-                       (unsigned) uid);
-       exit(FALSE);
+       errorMsg("cannot find username for UID %u\n", (unsigned) uid);
+       return(FALSE);
 }