diff options
Diffstat (limited to 'coreutils/whoami.c')
-rw-r--r-- | coreutils/whoami.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 30b17cab3..635712829 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -6,6 +6,16 @@ | |||
6 | * | 6 | * |
7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 7 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
8 | */ | 8 | */ |
9 | //config:config WHOAMI | ||
10 | //config: bool "whoami" | ||
11 | //config: default y | ||
12 | //config: help | ||
13 | //config: whoami is used to print the username of the current | ||
14 | //config: user id (same as id -un). | ||
15 | |||
16 | //applet:IF_WHOAMI(APPLET_NOFORK(whoami, whoami, BB_DIR_USR_BIN, BB_SUID_DROP, whoami)) | ||
17 | |||
18 | //kbuild:lib-$(CONFIG_WHOAMI) += whoami.o | ||
9 | 19 | ||
10 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ | 20 | /* BB_AUDIT SUSv3 N/A -- Matches GNU behavior. */ |
11 | 21 | ||
@@ -16,8 +26,6 @@ | |||
16 | 26 | ||
17 | #include "libbb.h" | 27 | #include "libbb.h" |
18 | 28 | ||
19 | /* This is a NOFORK applet. Be very careful! */ | ||
20 | |||
21 | int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 29 | int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
22 | int whoami_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | 30 | int whoami_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) |
23 | { | 31 | { |