2014-10-16 21:15:16 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
char *login;
|
|
|
|
|
|
|
|
argv0 = argv[0];
|
|
|
|
if (argc != 1)
|
|
|
|
eprintf("usage: %s\n", argv0);
|
|
|
|
if ((login = getlogin()))
|
2014-10-17 14:39:14 +00:00
|
|
|
puts(login);
|
2014-10-16 21:15:16 +00:00
|
|
|
else
|
|
|
|
eprintf("%s: no login name\n", argv0);
|
|
|
|
return 0;
|
|
|
|
}
|