From 452933e8cb905185993056f8708a6e3f5330981e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 21 May 2015 23:38:33 +0100 Subject: [PATCH] whoami: remove stdio --- Applications/util/whoami.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Applications/util/whoami.c b/Applications/util/whoami.c index 3e48db49..98256bbf 100644 --- a/Applications/util/whoami.c +++ b/Applications/util/whoami.c @@ -1,4 +1,5 @@ #include +#include #include #include @@ -10,7 +11,8 @@ int main(int argc, const char *argv[]) uid = geteuid(); pw = getpwuid(uid); if (pw) { - printf("%s\n", pw->pw_name); + write(1, pw->pw_name, strlen(pw->pw_name)); + write(1, "\n", 1); return 0; } -- 2.34.1