ref: 1346eca74c4da4daaf2f14ddc40e348b1f6e64a6
parent: fb1b0600f330175a0dee88c14a2fca5428e37d90
author: Ori Bernstein <[email protected]>
date: Fri Nov 3 00:23:27 EDT 2023
cons: use the mount for accssing users
--- a/cons.c
+++ b/cons.c
@@ -98,18 +98,18 @@
refreshusers(int fd, char **, int)
{
char *e;
- Tree *t;
+ Mount *mnt;
- if((t = opensnap("adm")) == nil){
+ if((mnt = getmount("adm")) == nil){
fprint(fd, "load users: missing 'adm'\n");
return;
}
- e = loadusers(fd, t);
+ e = loadusers(fd, mnt->root);
if(e != nil)
fprint(fd, "load users: %s\n", e);
else
fprint(fd, "refreshed users\n");
- closesnap(t);
+ clunkmount(mnt);
}
static void