Browse Source

Expose the 'dc' parameter to user programs by extending the mount call.

The mount call has another parameter, an int, which is the device character
used to pick a mount device. This works for mount and ramfs,
but it would be nice if someone else could verify it.

Now, go forth, and write new devmnt devices!

Change-Id: I765dd6830f5a26d8a96d5e568fe61871cf7e402c
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
2e756d2250
52 changed files with 63 additions and 60 deletions
  1. 1 1
      sys/include/libc.h
  2. 2 2
      sys/src/9/amd64pv/root/cpu.c
  3. 1 1
      sys/src/9/boot/settime.c
  4. 2 2
      sys/src/9/k10/root/cpu.c
  5. 3 2
      sys/src/9/k10/syscall.c
  6. 2 1
      sys/src/9/port/sysfile.c
  7. 2 2
      sys/src/9/root/cpu.c
  8. 1 1
      sys/src/cmd/acme/fsys.c
  9. 1 1
      sys/src/cmd/auth/factotum/util.c
  10. 1 1
      sys/src/cmd/auth/keyfs.c
  11. 1 1
      sys/src/cmd/auth/login.c
  12. 1 1
      sys/src/cmd/aux/consolefs.c
  13. 1 1
      sys/src/cmd/aux/searchfs.c
  14. 1 1
      sys/src/cmd/aux/statusbar.c
  15. 2 1
      sys/src/cmd/cfs/cfs.c
  16. 2 2
      sys/src/cmd/cpu.c
  17. 1 1
      sys/src/cmd/disk/kfs/9p2.c
  18. 1 1
      sys/src/cmd/disk/mkfs.c
  19. 1 1
      sys/src/cmd/fossil/9p.c
  20. 1 1
      sys/src/cmd/import.c
  21. 1 1
      sys/src/cmd/ip/ftpfs/ftpfs.c
  22. 1 1
      sys/src/cmd/ip/httpd/netlib_find.c
  23. 1 1
      sys/src/cmd/ip/httpd/wikipost.c
  24. 1 1
      sys/src/cmd/ip/imap4d/auth.c
  25. 1 1
      sys/src/cmd/lnfs.c
  26. 2 2
      sys/src/cmd/mount.c
  27. 1 1
      sys/src/cmd/ndb/cs.c
  28. 1 1
      sys/src/cmd/ndb/dns.c
  29. 1 1
      sys/src/cmd/ndb/dnsquery.c
  30. 1 1
      sys/src/cmd/page/view.c
  31. 1 1
      sys/src/cmd/plumb/fsys.c
  32. 1 1
      sys/src/cmd/ramfs.c
  33. 1 1
      sys/src/cmd/ratfs/main.c
  34. 1 1
      sys/src/cmd/rio/fsys.c
  35. 2 2
      sys/src/cmd/scat/header.c
  36. 1 1
      sys/src/cmd/srv.c
  37. 1 1
      sys/src/cmd/ssh2/ssh2.c
  38. 1 1
      sys/src/cmd/ssh2/sshsession.c
  39. 2 2
      sys/src/cmd/stats.c
  40. 1 1
      sys/src/cmd/telco/telco.c
  41. 1 1
      sys/src/cmd/trace.c
  42. 1 1
      sys/src/cmd/usb/audio/audiofs.c
  43. 1 1
      sys/src/cmd/usb/lib/fs.c
  44. 1 1
      sys/src/cmd/vac/vacfs.c
  45. 1 1
      sys/src/cmd/vnc/exporter.c
  46. 1 1
      sys/src/games/music/jukebox/music.c
  47. 1 1
      sys/src/libauth/amount.c
  48. 1 1
      sys/src/libauth/auth_chuid.c
  49. 1 1
      sys/src/libauth/newns.c
  50. 1 1
      sys/src/libdraw/newwindow.c
  51. 1 1
      sys/src/libndb/dnsquery.c
  52. 1 1
      sys/src/libplumb/mesg.c

+ 1 - 1
sys/include/libc.h

@@ -676,7 +676,7 @@ extern	int	fauth(int, char*);
 extern	int	fstat(int, uint8_t*, int);
 extern	int	fwstat(int, uint8_t*, int);
 extern	int	fversion(int, int, char*, int);
-extern	int	mount(int, int, char*, int, char*);
+extern	int	mount(int, int, char*, int, char*, int);
 extern	int	unmount(char*, char*);
 extern	int	noted(int);
 extern	int	notify(void(*)(void*, char*));

+ 2 - 2
sys/src/9/amd64pv/root/cpu.c

@@ -342,7 +342,7 @@ remoteside(int old)
 	strcpy(buf, VERSION9P);
 	if(fversion(fd, 64*1024, buf, sizeof buf) < 0)
 		exits("fversion failed");
-	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") < 0)
+	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "", 'M') < 0)
 		exits("mount failed");
 
 	close(fd);
@@ -1179,7 +1179,7 @@ lclnoteproc(int netfd)
 		return;
 	case 0:
 		close(pfd[0]);
-		if(mount(pfd[1], -1, "/dev", MBEFORE, "") < 0)
+		if(mount(pfd[1], -1, "/dev", MBEFORE, "", 'M') < 0)
 			fprint(2, "cpu: can't mount note proc: %r\n");
 		close(pfd[1]);
 		return;

+ 1 - 1
sys/src/9/boot/settime.c

@@ -50,7 +50,7 @@ settime(int islocal, int afd, char *rp)
 		f = open(timeserver, ORDWR);
 		if(f < 0)
 			return;
-		if(mount(f, afd, "/tmp", MREPL, rp) < 0){
+		if(mount(f, afd, "/tmp", MREPL, rp, 'M') < 0){
 			warning("settime mount");
 			close(f);
 			return;

+ 2 - 2
sys/src/9/k10/root/cpu.c

@@ -342,7 +342,7 @@ remoteside(int old)
 	strcpy(buf, VERSION9P);
 	if(fversion(fd, 64*1024, buf, sizeof buf) < 0)
 		exits("fversion failed");
-	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") < 0)
+	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "", 'M') < 0)
 		exits("mount failed");
 
 	close(fd);
@@ -1179,7 +1179,7 @@ lclnoteproc(int netfd)
 		return;
 	case 0:
 		close(pfd[0]);
-		if(mount(pfd[1], -1, "/dev", MBEFORE, "") < 0)
+		if(mount(pfd[1], -1, "/dev", MBEFORE, "", 'M') < 0)
 			fprint(2, "cpu: can't mount note proc: %r\n");
 		close(pfd[1]);
 		return;

+ 3 - 2
sys/src/9/k10/syscall.c

@@ -244,16 +244,17 @@ syscall(int badscallnr, Ureg *ureg)
 {
 	// can only handle 4 args right now.
 	uintptr_t a0, a1, a2, a3;
-	uintptr_t a4, a5 = 0;
+	uintptr_t a4, a5;
 
 	a0 = ureg->di;
 	a1 = ureg->si;
 	a2 = ureg->dx;
 	a3 = ureg->r10;
 	a4 = ureg->r8;
+	a5 = ureg->r9;
 	Proc *up = externup();
 	unsigned int scallnr = (unsigned int) badscallnr;
-	if (0) iprint("Syscall %d, %lx, %lx, %lx %lx %lx\n", scallnr, a0, a1, a2, a3, a4);
+	if (0) iprint("Syscall %d, %lx, %lx, %lx %lx %lx %lx\n", scallnr, a0, a1, a2, a3, a4, a5);
 	char *e;
 	uintptr_t	sp;
 	int s;

+ 2 - 1
sys/src/9/port/sysfile.c

@@ -1303,7 +1303,7 @@ sysmount(Ar0* ar0, ...)
 {
 	int afd, fd, flag;
 	char *aname, *old;
-	int dc = 'M';
+	int dc;
 	va_list list;
 	va_start(list, ar0);
 
@@ -1317,6 +1317,7 @@ sysmount(Ar0* ar0, ...)
 	old = va_arg(list, char*);
 	flag = va_arg(list, int);
 	aname = va_arg(list, char*);
+	dc = va_arg(list, int);
 	va_end(list);
 
 	ar0->i = bindmount(dc, fd, afd, nil, old, flag, aname);

+ 2 - 2
sys/src/9/root/cpu.c

@@ -338,7 +338,7 @@ remoteside(int old)
 	strcpy(buf, VERSION9P);
 	if(fversion(fd, 64*1024, buf, sizeof buf) < 0)
 		exits("fversion failed");
-	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") < 0)
+	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "", 'M') < 0)
 		exits("mount failed");
 
 	close(fd);
@@ -1109,7 +1109,7 @@ lclnoteproc(int netfd)
 		return;
 	case 0:
 		close(pfd[0]);
-		if(mount(pfd[1], -1, "/dev", MBEFORE, "") < 0)
+		if(mount(pfd[1], -1, "/dev", MBEFORE, "", 'M') < 0)
 			fprint(2, "cpu: can't mount note proc: %r\n");
 		close(pfd[1]);
 		return;

+ 1 - 1
sys/src/cmd/acme/fsys.c

@@ -279,7 +279,7 @@ fsysmount(Rune *dir, int ndir, Rune **incl, int nincl)
 	close(sfd);
 	m = fsysaddid(dir, ndir, incl, nincl);
 	sprint(buf, "%d", m->id);
-	if(mount(cfd, -1, "/mnt/acme", MREPL, buf) < 0){
+	if(mount(cfd, -1, "/mnt/acme", MREPL, buf, 'M') < 0){
 		fsysdelid(m);
 		return nil;
 	}

+ 1 - 1
sys/src/cmd/auth/factotum/util.c

@@ -22,7 +22,7 @@ bindnetcs(void)
 
 	if(access("/net/cs", AEXIST) < 0){
 		if((srvfd = open("#s/cs", ORDWR)) >= 0){
-			if(mount(srvfd, -1, "/net", MBEFORE, "") >= 0)
+			if(mount(srvfd, -1, "/net", MBEFORE, "", 'M') >= 0)
 				return 0;
 			close(srvfd);
 		}

+ 1 - 1
sys/src/cmd/auth/keyfs.c

@@ -194,7 +194,7 @@ main(int argc, char *argv[])
 		error("fork");
 	default:
 		close(p[1]);
-		if(mount(p[0], -1, mntpt, MREPL|MCREATE, "") < 0)
+		if(mount(p[0], -1, mntpt, MREPL|MCREATE, "", 'M') < 0)
 			error("can't mount: %r");
 		exits(0);
 	}

+ 1 - 1
sys/src/cmd/auth/login.c

@@ -115,7 +115,7 @@ mountfactotum(char *srvname)
 	fd = open(srvname, ORDWR);
 	if(fd < 0)
 		sysfatal("opening factotum: %r");
-	mount(fd, -1, "/mnt", MBEFORE, "");
+	mount(fd, -1, "/mnt", MBEFORE, "", 'M');
 	close(fd);
 }
 

+ 1 - 1
sys/src/cmd/aux/consolefs.c

@@ -381,7 +381,7 @@ fsmount(char *mntpt)
 		close(srv);
 	}
 
-	mount(pfd[1], -1, mntpt, MBEFORE, "");
+	mount(pfd[1], -1, mntpt, MBEFORE, "", 'M');
 	close(pfd[1]);
 	return fs;
 }

+ 1 - 1
sys/src/cmd/aux/searchfs.c

@@ -227,7 +227,7 @@ main(int argc, char **argv)
 		exits(nil);
 	}
 
-	if(mount(p[1], -1, mnt, MREPL, "") < 0){
+	if(mount(p[1], -1, mnt, MREPL, "", 'M') < 0){
 		close(p[1]);
 		fatal("mount failed");
 	}

+ 1 - 1
sys/src/cmd/aux/statusbar.c

@@ -286,7 +286,7 @@ newwin(char *win)
 		return -1;
 	}
 	sprint(spec, "new -r %s", win);
-	if(mount(srvfd, -1, "/mnt/wsys", 0, spec) == -1){
+	if(mount(srvfd, -1, "/mnt/wsys", 0, spec, 'M') == -1){
 		fprint(2, "statusbar: can't mount /mnt/wsys: %r (spec=%s)\n", spec);
 		return -1;
 	}

+ 2 - 1
sys/src/cmd/cfs/cfs.c

@@ -269,7 +269,8 @@ mountinit(char *server, char *mountpoint)
 		break;
 	default:
 		if (noauth)
-			err = mount(p[1], -1, mountpoint, MREPL|MCREATE, "");
+			err = mount(p[1], -1, mountpoint, MREPL|MCREATE, "",
+				    'M');
 		else
 			err = amount(p[1], mountpoint, MREPL|MCREATE, "");
 		if (err < 0)

+ 2 - 2
sys/src/cmd/cpu.c

@@ -400,7 +400,7 @@ remoteside(int old)
 	strcpy(buf, VERSION9P);
 	if(fversion(fd, 64*1024, buf, sizeof buf) < 0)
 		exits("fversion failed");
-	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "") < 0)
+	if(mount(fd, -1, "/mnt/term", MCREATE|MREPL, "", 'M') < 0)
 		exits("mount failed");
 
 	close(fd);
@@ -1166,7 +1166,7 @@ lclnoteproc(int netfd)
 		return;
 	case 0:
 		close(pfd[0]);
-		if(mount(pfd[1], -1, "/dev", MBEFORE, "") < 0)
+		if(mount(pfd[1], -1, "/dev", MBEFORE, "", 'M') < 0)
 			fprint(2, "cpu: can't mount note proc: %r\n");
 		close(pfd[1]);
 		return;

+ 1 - 1
sys/src/cmd/disk/kfs/9p2.c

@@ -65,7 +65,7 @@ fsauth(Chan *chan, Fcall *f, Fcall *r)
 
 	if(access("/mnt/factotum", 0) < 0)
 		if((fd = open("/srv/factotum", ORDWR)) >= 0)
-			mount(fd, -1, "/mnt", MBEFORE, "");
+			mount(fd, -1, "/mnt", MBEFORE, "", 'M');
 
 	afd = open("/mnt/factotum/rpc", ORDWR);
 	if(afd < 0){

+ 1 - 1
sys/src/cmd/disk/mkfs.c

@@ -772,7 +772,7 @@ mountkfs(char *name)
 		fprint(2, "can't open %q\n", kname);
 		exits("open /srv/kfs");
 	}
-	if(mount(sfd, -1, "/n/kfs", MREPL|MCREATE, "") < 0){
+	if(mount(sfd, -1, "/n/kfs", MREPL|MCREATE, "", 'M') < 0){
 		fprint(2, "can't mount kfs on /n/kfs\n");
 		exits("mount kfs");
 	}

+ 1 - 1
sys/src/cmd/fossil/9p.c

@@ -966,7 +966,7 @@ conIPCheck(Con* con)
 		if(access("/mnt/ipok/ok", AEXIST) < 0){
 			/* mount closes the fd on success */
 			if((fd = open("/srv/ipok", ORDWR)) >= 0 
-			&& mount(fd, -1, "/mnt/ipok", MREPL, "") < 0)
+			&& mount(fd, -1, "/mnt/ipok", MREPL, "", 'M') < 0)
 				close(fd);
 			if(access("/mnt/ipok/ok", AEXIST) < 0){
 				vtSetError("cannot verify remote address");

+ 1 - 1
sys/src/cmd/import.c

@@ -244,7 +244,7 @@ main(int argc, char **argv)
 		post(srvfile, srvpost, fd);
 	}
 	procsetname("mount on %s", mntpt);
-	if(mount(fd, -1, mntpt, mntflags, "") < 0)
+	if(mount(fd, -1, mntpt, mntflags, "", 'M') < 0)
 		sysfatal("can't mount %s: %r", argv[1]);
 	alarm(0);
 

+ 1 - 1
sys/src/cmd/ip/ftpfs/ftpfs.c

@@ -195,7 +195,7 @@ main(int argc, char *argv[])
 		break;
 	default:
 		close(p[0]);
-		if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "") < 0)
+		if(mount(p[1], -1, mountpoint, MREPL|MCREATE, "", 'M') < 0)
 			fatal("mount failed: %r");
 	}
 	exits(0);

+ 1 - 1
sys/src/cmd/ip/httpd/netlib_find.c

@@ -174,7 +174,7 @@ init800fs(char*name,char*pat)
 	fd800fs = open(name, ORDWR);
 	if(fd800fs < 0)
 		exits("can't connect to 800fs server");
-	if(mount(fd800fs, -1, "/mnt", MREPL, "") < 0)
+	if(mount(fd800fs, -1, "/mnt", MREPL, "", 'M') < 0)
 		exits("can't mount /mnt");
 	fd800fs = open("/mnt/search", ORDWR);
 	n = strlen("search=")+strlen(pat)+1;

+ 1 - 1
sys/src/cmd/ip/httpd/wikipost.c

@@ -148,7 +148,7 @@ mountwiki(HConnect *c, char *service)
 		hfail(c, HNotFound);
 		exits("failed");
 	}
-	if(mount(fd, -1, "/mnt/wiki", MREPL, "") < 0){
+	if(mount(fd, -1, "/mnt/wiki", MREPL, "", 'M') < 0){
 		syslog(0, LOG, "%s mount /mnt/wiki failed: %r", hp->remotesys);
 		hfail(c, HNotFound);
 		exits("failed");

+ 1 - 1
sys/src/cmd/ip/imap4d/auth.c

@@ -37,7 +37,7 @@ enableForwarding(void)
 	fd = open("/srv/ratify", ORDWR);
 	if(fd < 0)
 		return;
-	if(!mount(fd, -1, "/mail/ratify", MBEFORE, "")){
+	if(!mount(fd, -1, "/mail/ratify", MBEFORE, "", 'M')){
 		close(fd);
 		return;
 	}

+ 1 - 1
sys/src/cmd/lnfs.c

@@ -171,7 +171,7 @@ main(int argc, char *argv[])
 		break;
 	default:
 		close(p[0]);	/* don't deadlock if child fails */
-		if(mount(p[1], -1, defmnt, MREPL|MCREATE, "") < 0)
+		if(mount(p[1], -1, defmnt, MREPL|MCREATE, "", 'M') < 0)
 			sysfatal("mount failed: %r");
 	}
 	exits(0);

+ 2 - 2
sys/src/cmd/mount.c

@@ -30,7 +30,7 @@ amount0(int fd, char *mntpt, int flags, char *aname, char *keyspec)
 		else
 			fprint(2, "%s: auth_proxy: %r\n", argv0);
 	}
-	rv = mount(fd, afd, mntpt, flags, aname);
+	rv = mount(fd, afd, mntpt, flags, aname, 'M');
 	if(afd >= 0)
 		close(afd);
 	return rv;
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
 
 	notify(catch);
 	if(noauth)
-		rv = mount(fd, -1, argv[1], flag, spec);
+		rv = mount(fd, -1, argv[1], flag, spec, 'M');
 	else
 		rv = amount0(fd, argv[1], flag, spec, keyspec);
 	if(rv < 0){

+ 1 - 1
sys/src/cmd/ndb/cs.c

@@ -334,7 +334,7 @@ mountinit(char *service, char *mntpt)
 		 *  put ourselves into the file system
 		 */
 		close(p[0]);
-		if(mount(p[1], -1, mntpt, MAFTER, "") < 0)
+		if(mount(p[1], -1, mntpt, MAFTER, "", 'M') < 0)
 			error("mount failed\n");
 		_exits(0);
 	}

+ 1 - 1
sys/src/cmd/ndb/dns.c

@@ -136,7 +136,7 @@ justremount(char *service, char *mntpt)
 	f = open(service, ORDWR);
 	if(f < 0)
 		abort(); 	/* service */;
-	while (mount(f, -1, mntpt, MAFTER, "") < 0) {
+	while (mount(f, -1, mntpt, MAFTER, "", 'M') < 0) {
 		dnslog("dns mount -a on %s failed: %r", mntpt);
 		sleep(5000);
 	}

+ 1 - 1
sys/src/cmd/ndb/dnsquery.c

@@ -35,7 +35,7 @@ setup(int argc, char **argv)
 		fd = open(srv, ORDWR);
 		if(fd < 0)
 			sysfatal("can't open %s: %r", srv);
-		if(mount(fd, -1, mtpt, MBEFORE, "") < 0)
+		if(mount(fd, -1, mtpt, MBEFORE, "", 'M') < 0)
 			sysfatal("can't mount(%s, %s): %r", srv, mtpt);
 		fd = open(dns, ORDWR);
 		if(fd < 0)

+ 1 - 1
sys/src/cmd/page/view.c

@@ -1016,7 +1016,7 @@ newwin(void)
 	}
 	free(srv);
 	sprint(spec, "new -pid %d", pid);
-	if(mount(srvfd, -1, "/mnt/wsys", 0, spec) == -1){
+	if(mount(srvfd, -1, "/mnt/wsys", 0, spec, 'M') == -1){
 		fprint(2, "page: can't mount /mnt/wsys: %r (spec=%s)\n", spec);
 		wexits("no mount");
 	}

+ 1 - 1
sys/src/cmd/plumb/fsys.c

@@ -225,7 +225,7 @@ startfsys(void)
 	procrfork(fsysproc, nil, Stack, RFFDG);
 
 	close(p[0]);
-	if(mount(p[1], -1, "/mnt/plumb", MREPL, "") < 0)
+	if(mount(p[1], -1, "/mnt/plumb", MREPL, "", 'M') < 0)
 		error("can't mount /mnt/plumb: %r");
 	close(p[1]);
 }

+ 1 - 1
sys/src/cmd/ramfs.c

@@ -248,7 +248,7 @@ main(int argc, char *argv[])
 		break;
 	default:
 		close(p[0]);	/* don't deadlock if child fails */
-		if(defmnt && mount(p[1], -1, defmnt, MREPL|MCREATE, "") < 0)
+		if(defmnt && mount(p[1], -1, defmnt, MREPL|MCREATE, "", 'M') < 0)
 			error("mount failed");
 	}
 	exits(0);

+ 1 - 1
sys/src/cmd/ratfs/main.c

@@ -165,7 +165,7 @@ post(int fd, char *mountpoint)
 		 * another server is already running, so just exit.
 		 */
 		f = open(SRVFILE, ORDWR);
-		if(f >= 0 && mount(f, -1, mountpoint, MREPL|MCREATE, "") >= 0){
+		if(f >= 0 && mount(f, -1, mountpoint, MREPL|MCREATE, "", 'M') >= 0){
 				unmount(0, mountpoint);
 				close(f);
 				exits(0);

+ 1 - 1
sys/src/cmd/rio/fsys.c

@@ -243,7 +243,7 @@ filsysmount(Filsys *fs, int id)
 
 	close(fs->sfd);	/* close server end so mount won't hang if exiting */
 	sprint(buf, "%d", id);
-	if(mount(fs->cfd, -1, "/mnt/wsys", MREPL, buf) < 0){
+	if(mount(fs->cfd, -1, "/mnt/wsys", MREPL, buf, 'M') < 0){
 		fprint(2, "mount failed: %r\n");
 		return -1;
 	}

+ 2 - 2
sys/src/cmd/scat/header.c

@@ -283,7 +283,7 @@ loop:
 	/*
 	 * mount nfs jukebox server
 	 */
-	if(mount(s1, -1, "/n/njuke", 0, "") < 0) {
+	if(mount(s1, -1, "/n/njuke", 0, "", 'M') < 0) {
 		close(s1);
 		Bprint(&bout, "\"mount /srv/%s /n/juke\" failed: %r\n", JUKEFS);
 		goto out;
@@ -309,7 +309,7 @@ loop:
 	/*
 	 * mount 9660 server
 	 */
-	if(mount(s2, -1, "/n/dss", 0, dssname) < 0) {
+	if(mount(s2, -1, "/n/dss", 0, dssname, 'M') < 0) {
 		close(s2);
 		if(count == 0) {
 			// do it again so /n/njuke is in 9660's namespace

+ 1 - 1
sys/src/cmd/srv.c

@@ -206,7 +206,7 @@ Mount:
 	if(domount == 0 || reallymount == 0)
 		exits(0);
 
-	if((!doauth && mount(fd, -1, mtpt, mountflag, "") < 0)
+	if((!doauth && mount(fd, -1, mtpt, mountflag, "", 'M') < 0)
 	|| (doauth && amount(fd, mtpt, mountflag, "") < 0)){
 		err[0] = 0;
 		errstr(err, sizeof err);

+ 1 - 1
sys/src/cmd/ssh2/ssh2.c

@@ -137,7 +137,7 @@ timedmount(int fd, int afd, char *mntpt, int flag, char *aname)
 
 	atnotify(catcher, 1);
 	oalarm = alarm(5*1000);		/* don't get stuck here */
-	ret = mount(fd, afd, mntpt, flag, aname);
+	ret = mount(fd, afd, mntpt, flag, aname, 'M');
 	alarm(oalarm);
 	atnotify(catcher, 0);
 	return ret;

+ 1 - 1
sys/src/cmd/ssh2/sshsession.c

@@ -122,7 +122,7 @@ mounttunnel(int ctlfd)
 		hangup(ctlfd);
 		exits("open");
 	}
-	if (mount(fd, -1, np, MBEFORE, "") < 0) {
+	if (mount(fd, -1, np, MBEFORE, "", 'M') < 0) {
 		syslog(0, "ssh", "can't mount %s in %s: %r", p, np);
 		hangup(ctlfd);
 		exits("can't mount");

+ 2 - 2
sys/src/cmd/stats.c

@@ -664,10 +664,10 @@ initmach(Machine *m, char *name)
 			return 0;
 		}
 		/* BUG? need to use amount() now? */
-		if(mount(fd, -1, mpt, MREPL, "") < 0){
+		if(mount(fd, -1, mpt, MREPL, "", 'M') < 0){
 			fprint(2, "stats: mount %s on %s failed (%r); trying /n/sid\n", name, mpt);
 			strcpy(mpt, "/n/sid");
-			if(mount(fd, -1, mpt, MREPL, "") < 0){
+			if(mount(fd, -1, mpt, MREPL, "", 'M') < 0){
 				fprint(2, "stats: mount %s on %s failed: %r\n", name, mpt);
 				return 0;
 			}

+ 1 - 1
sys/src/cmd/telco/telco.c

@@ -1420,7 +1420,7 @@ receiver(Dev *d)
 			syslog(0, LOGFILE, "can't open telco: %r");
 			exits(0);
 		}
-		if(mount(fd, -1, "/net", MAFTER, "") < 0){
+		if(mount(fd, -1, "/net", MAFTER, "", 'M') < 0){
 			syslog(0, LOGFILE, "can't mount: %r");
 			exits(0);
 		}

+ 1 - 1
sys/src/cmd/trace.c

@@ -594,7 +594,7 @@ drawtrace(void)
 		line[sizeof(line) - 1] = '\0';
 		rfork(RFNAMEG);
 	
-		if(mount(wfd, -1, "/mnt/wsys", MREPL, line) < 0) 
+		if(mount(wfd, -1, "/mnt/wsys", MREPL, line, 'M') < 0) 
 			sysfatal("%s: Cannot mount %s under /mnt/wsys: %r",
 						argv0, line);
 	

+ 1 - 1
sys/src/cmd/usb/audio/audiofs.c

@@ -215,7 +215,7 @@ serve(void *)
 		remove(srvfile);
 		post(srvfile, "usbaudio", p[1]);
 	}
-	if(mount(p[1], -1, mntpt, MBEFORE, "") < 0)
+	if(mount(p[1], -1, mntpt, MBEFORE, "", 'M') < 0)
 		sysfatal("mount failed");
 	if(endpt[Play] >= 0 && devctl(epdev[Play], "name audio") < 0)
 		fprint(2, "audio: name audio: %r\n");

+ 1 - 1
sys/src/cmd/usb/lib/fs.c

@@ -679,7 +679,7 @@ usbfsinit(char* srv, char *mnt, Usbfs *f, int flag)
 		afd = fauth(sfd, "");
 		if(afd >= 0)
 			sysfatal("authentication required??");
-		if(mount(sfd, -1, mnt, flag, "") < 0)
+		if(mount(sfd, -1, mnt, flag, "", 'M') < 0)
 			sysfatal("mount: %r");
 	}
 	close(fd[0]);

+ 1 - 1
sys/src/cmd/vac/vacfs.c

@@ -225,7 +225,7 @@ threadmain(int argc, char *argv[])
 	if(!stdio){
 		close(p[0]);
 		if(defmnt){
-			if(mount(srvfd, -1, defmnt, MREPL|MCREATE, "") < 0)
+			if(mount(srvfd, -1, defmnt, MREPL|MCREATE, "", 'M') < 0)
 				sysfatal("mount %s: %r", defmnt);
 		}
 	}

+ 1 - 1
sys/src/cmd/vnc/exporter.c

@@ -29,7 +29,7 @@ mounter(char *mntpt, int how, int fd, int n)
 	for(i = 0; i < n; i++){
 		snprint(buf, sizeof buf, "%d", i);
 		mfd = dup(fd, -1);
-		if(mount(mfd, -1, mntpt, how, buf) == -1){
+		if(mount(mfd, -1, mntpt, how, buf, 'M') == -1){
 			close(mfd);
 			fprint(2, "can't mount on %s: %r\n", mntpt);
 			ok = 0;

+ 1 - 1
sys/src/games/music/jukebox/music.c

@@ -579,7 +579,7 @@ makewindow(int dx, int dy, int wflag){
 			sysfatal("open %s: %r", rio);
 		snprint(aname, sizeof aname, "new -dx %d -dy %d", dx, dy);
 		rfork(RFNAMEG);
-		if(mount(mountfd, -1, "/mnt/wsys", MREPL, aname) < 0)
+		if(mount(mountfd, -1, "/mnt/wsys", MREPL, aname, 'M') < 0)
 			sysfatal("mount: %r");
 		if(bind("/mnt/wsys", "/dev", MBEFORE) < 0)
 			sysfatal("mount: %r");

+ 1 - 1
sys/src/libauth/amount.c

@@ -24,7 +24,7 @@ amount(int fd, char *mntpt, int flags, char *aname)
 		if(ai != nil)
 			auth_freeAI(ai);
 	}
-	rv = mount(fd, afd, mntpt, flags, aname);
+	rv = mount(fd, afd, mntpt, flags, aname, 'M');
 	if(afd >= 0)
 		close(afd);
 	return rv;

+ 1 - 1
sys/src/libauth/auth_chuid.c

@@ -40,7 +40,7 @@ auth_chuid(AuthInfo *ai, char *ns)
 	/* get a link to factotum as new user */
 	fd = open("/srv/factotum", ORDWR);
 	if(fd >= 0)
-		mount(fd, -1, "/mnt", MREPL, "");
+		mount(fd, -1, "/mnt", MREPL, "", 'M');
 
 	/* set up new namespace */
 	return newns(ai->cuid, ns);

+ 1 - 1
sys/src/libauth/newns.c

@@ -144,7 +144,7 @@ famount(int fd, AuthRpc *rpc, char *mntpt, int flags, char *aname)
 		if(ai != nil)
 			auth_freeAI(ai);
 	}
-	ret = mount(fd, afd, mntpt, flags, aname);
+	ret = mount(fd, afd, mntpt, flags, aname, 'M');
 	if(afd >= 0)
 		close(afd);
 	return ret;

+ 1 - 1
sys/src/libdraw/newwindow.c

@@ -31,6 +31,6 @@ newwindow(char *str)
 		snprint(buf, sizeof buf, "new %s", str);
 	else
 		strcpy(buf, "new");
-	return mount(fd, -1, "/dev", MBEFORE, buf);
+	return mount(fd, -1, "/dev", MBEFORE, buf, 'M');
 }
 

+ 1 - 1
sys/src/libndb/dnsquery.c

@@ -50,7 +50,7 @@ dnsquery(char *net, char *val, char *type)
 		fd = open(rip, ORDWR);
 		if(fd < 0)
 			return nil;
-		if(mount(fd, -1, net, MBEFORE, "") < 0){
+		if(mount(fd, -1, net, MBEFORE, "", 'M') < 0){
 			close(fd);
 			return nil;
 		}

+ 1 - 1
sys/src/libplumb/mesg.c

@@ -36,7 +36,7 @@ plumbopen(char *name, int omode)
 		free(s);
 		if(f < 0)
 			return -1;
-		if(mount(f, -1, "/mnt/plumb", MREPL, "") < 0){
+		if(mount(f, -1, "/mnt/plumb", MREPL, "", 'M') < 0){
 			close(f);
 			return -1;
 		}