summaryrefslogtreecommitdiff
path: root/sys/src/9/port/sysfile.c
diff options
context:
space:
mode:
authorJacob Moody <moody@posixcafe.org>2022-05-28 02:23:29 +0000
committerJacob Moody <moody@posixcafe.org>2022-05-28 02:23:29 +0000
commite9bb7876e1bd7f9aaef4e1cd0c64c97f411ffde5 (patch)
tree161d07a002c1b9623afff61d72d3d5703a40a252 /sys/src/9/port/sysfile.c
parent3351b674802d5a69ddb6d4d0354c0e034804b0c1 (diff)
kernel: add chdev command to devcons
Diffstat (limited to 'sys/src/9/port/sysfile.c')
-rw-r--r--sys/src/9/port/sysfile.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/src/9/port/sysfile.c b/sys/src/9/port/sysfile.c
index b7b0c51aa..f98fbf841 100644
--- a/sys/src/9/port/sysfile.c
+++ b/sys/src/9/port/sysfile.c
@@ -1048,7 +1048,7 @@ bindmount(int ismount, int fd, int afd, char* arg0, char* arg1, int flag, char*
nexterror();
}
- if(up->pgrp->noattach)
+ if(!canmount(up->pgrp))
error(Enoattach);
ac = nil;
@@ -1160,14 +1160,8 @@ sysunmount(va_list list)
nexterror();
}
if(name != nil) {
- /*
- * This has to be namec(..., Aopen, ...) because
- * if arg[0] is something like /srv/cs or /fd/0,
- * opening it is the only way to get at the real
- * Chan underneath.
- */
validaddr((uintptr)name, 1, 0);
- cmounted = namec(name, Aopen, OREAD, 0);
+ cmounted = namec(name, Aunmount, OREAD, 0);
}
cunmount(cmount, cmounted);
poperror();