summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 15:36:07 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-19 15:36:07 +0100
commitc7fc69bd6a965a4cb8eca7c9d4a069fb271c68e2 (patch)
tree057172eaef257379f9e9244e5612056befae3c2e
parent672cf179a1a8a17a4a977eeada60a035a27ed98d (diff)
downloadplan9front-c7fc69bd6a965a4cb8eca7c9d4a069fb271c68e2.tar.xz
acme: use getuser() in fsinit()
-rw-r--r--sys/src/cmd/acme/fsys.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/src/cmd/acme/fsys.c b/sys/src/cmd/acme/fsys.c
index 4719542ab..bd1214bff 100644
--- a/sys/src/cmd/acme/fsys.c
+++ b/sys/src/cmd/acme/fsys.c
@@ -116,8 +116,6 @@ void
fsysinit(void)
{
int p[2];
- int n, fd;
- char buf[256];
if(pipe(p) < 0)
error("can't create pipe");
@@ -125,15 +123,7 @@ fsysinit(void)
sfd = p[1];
fmtinstall('F', fcallfmt);
clockfd = open("/dev/time", OREAD|OCEXEC);
- fd = open("/dev/user", OREAD);
- if(fd >= 0){
- n = read(fd, buf, sizeof buf-1);
- if(n > 0){
- buf[n] = 0;
- user = estrdup(buf);
- }
- close(fd);
- }
+ user = getuser();
proccreate(fsysproc, nil, STACK);
}