Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0410/9

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


srv: add -n flag like in mount
 [rsc] --rw-rw-r-- M 628694 glenda sys 4003 Apr 10 12:07 sys/src/cmd/srv.c
	/n/sourcesdump/2006/0410/plan9/sys/src/cmd/srv.c:10,15 - 
	/n/sourcesdump/2006/0411/plan9/sys/src/cmd/srv.c:10,16
	  void	rpc(int, int);
	  void	post(char*, int);
	  void	mountfs(char*, int);
	+ int	doauth = 1;
	  
	  void
	  usage(void)
	/n/sourcesdump/2006/0410/plan9/sys/src/cmd/srv.c:105,110 - 
	/n/sourcesdump/2006/0411/plan9/sys/src/cmd/srv.c:106,114
	  		domount = 1;
	  		reallymount = 1;
	  		break;
	+ 	case 'n':
	+ 		doauth = 0;
	+ 		break;
	  	case 'q':
	  		domount = 1;
	  		reallymount = 0;
	/n/sourcesdump/2006/0410/plan9/sys/src/cmd/srv.c:193,199 - 
	/n/sourcesdump/2006/0411/plan9/sys/src/cmd/srv.c:197,204
	  	if(domount == 0 || reallymount == 0)
	  		exits(0);
	  
	- 	if(amount(fd, mtpt, mountflag, "") < 0){
	+ 	if((!doauth && mount(fd, -1, mtpt, mountflag, "") < 0)
	+ 	|| (doauth && amount(fd, mtpt, mountflag, "") < 0)){
	  		err[0] = 0;
	  		errstr(err, sizeof err);
	  		if(strstr(err, "Hangup") || strstr(err, "hungup") || strstr(err, "timed out")){
 [rsc] --rw-rw-r-- M 628694 glenda sys 4672 Apr 10 13:32 sys/man/4/srv
	/n/sourcesdump/2006/0410/plan9/sys/man/4/srv:4,10 - 
	/n/sourcesdump/2006/0411/plan9/sys/man/4/srv:4,10
	  .SH SYNOPSIS
	  .B srv
	  [
	- .B -abceCmq
	+ .B -abceCmnq
	  ]
	  [
	  .B -s
	/n/sourcesdump/2006/0410/plan9/sys/man/4/srv:107,116 - 
	/n/sourcesdump/2006/0411/plan9/sys/man/4/srv:107,119
	  .BR a ,
	  .BR b ,
	  .BR c ,
	+ .BR C ,
	  and
	- .B C 
	+ .B n
	  flags are used to control the mount flag as in
	- .IR bind (1).
	+ .I mount
	+ (see
	+ .IR bind (1)).
	  The
	  .B e
	  flag causes


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.