Oops. Forgot the usleep.c file.
[oweals/busybox.git] / whoami.c
index 7fd5d01b29dde2446e141de739895e69b1f062cd..3677c2fbcb0aed8e97da8c52fcbf83508e995713 100644 (file)
--- a/whoami.c
+++ b/whoami.c
@@ -1,3 +1,4 @@
+/* vi: set sw=4 ts=4: */
 /*
  * Mini whoami implementation for busybox
  *
 #include <pwd.h>
 
 static const char whoami_usage[] = "whoami\n\n"
-"Print the user name associated with the current effective user id.\n"
-"Same as id -un.\n";
+       "Print the user name associated with the current effective user id.\n"
 
-extern int whoami_main(int argc, char **argv) {
+       "Same as id -un.\n";
+
+extern int whoami_main(int argc, char **argv)
+{
        struct passwd *pw;
        uid_t uid;
 
-       if (argc > 1) usage (whoami_usage);
+       if (argc > 1)
+               usage(whoami_usage);
 
-       uid = geteuid ();
-       pw = getpwuid (uid);
+       uid = geteuid();
+       pw = getpwuid(uid);
        if (pw) {
-               puts (pw->pw_name);
-               exit (TRUE);
-       }
-       fprintf (stderr, "%s: cannot find username for UID %u\n", argv[0], (unsigned) uid);
-       exit (FALSE);
+               puts(pw->pw_name);
+               exit(TRUE);
+       }
+       fprintf(stderr, "%s: cannot find username for UID %u\n", argv[0],
+                       (unsigned) uid);
+       exit(FALSE);
 }