diff options
Diffstat (limited to 'toys/posix/logname.c')
-rw-r--r-- | toys/posix/logname.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/toys/posix/logname.c b/toys/posix/logname.c index 6ebdb329..b638ea2f 100644 --- a/toys/posix/logname.c +++ b/toys/posix/logname.c @@ -1,6 +1,4 @@ -/* vi: set sw=4 ts=4: - * - * logname.c - Print user's login name. +/* logname.c - Print user's login name. * * Copyright 2012 Elie De Brauwer <eliedebrauwer@gmail.com> * @@ -9,19 +7,19 @@ USE_LOGNAME(NEWTOY(logname, ">0", TOYFLAG_BIN)) config LOGNAME - bool "logname" - default y - help - usage: logname + bool "logname" + default y + help + usage: logname - Prints the calling user's name or an error when this cannot be - determined. + Prints the calling user's name or an error when this cannot be + determined. */ #include "toys.h" void logname_main(void) { - if (getlogin_r(toybuf, sizeof(toybuf))) error_exit("no login name"); - xputs(toybuf); + if (getlogin_r(toybuf, sizeof(toybuf))) error_exit("no login name"); + xputs(toybuf); } |