ref: f6da1ab12d14fe4db7a76f390d6dfc85de660f1c
dir: /getuser.c/
#include <u.h>
#include <pwd.h>
#include <libc.h>
#include "drawcpu.h"
char*
getuser(void)
{
static char user[64];
struct passwd *pw;
pw = getpwuid(getuid());
if(pw == nil)
return "none";
strecpy(user, user+sizeof user, pw->pw_name);
return user;
}