fprintf(stderr, "Usage: mountd [-n] [export_file]\n");
fprintf(stderr, "Usage: mountd [-dn] [export_file]\n");
main(argc, argv)	int argc;	char **argv;{	SVCXPRT *udptransp, *tcptransp;	int c;	while ((c = getopt(argc, argv, "n")) != EOF)		switch (c) {		case 'n':			resvport_only = 0;			break;		default:			fprintf(stderr, "Usage: mountd [-n] [export_file]\n");			exit(1);		};	argc -= optind;	argv += optind;	grphead = (struct grouplist *)NULL;	exphead = (struct exportlist *)NULL;	mlhead = (struct mountlist *)NULL;	if (argc == 1) {		strncpy(exname, *argv, MAXPATHLEN-1);		exname[MAXPATHLEN-1] = '\0';	} else		strcpy(exname, _PATH_EXPORTS);	openlog("mountd", LOG_PID, LOG_DAEMON);	if (debug)		fprintf(stderr,"Getting export list.\n");	get_exportlist();	if (debug)		fprintf(stderr,"Getting mount list.\n");	get_mountlist();	if (debug)		fprintf(stderr,"Here we go.\n");	if (debug == 0) {		daemon(0, 0);		signal(SIGINT, SIG_IGN);		signal(SIGQUIT, SIG_IGN);	}	signal(SIGHUP, (void (*) __P((int))) get_exportlist);	signal(SIGTERM, (void (*) __P((int))) send_umntall);	{ FILE *pidfile = fopen(_PATH_MOUNTDPID, "w");	  if (pidfile != NULL) {		fprintf(pidfile, "%d\n", getpid());		fclose(pidfile);	  }	}	if ((udptransp = svcudp_create(RPC_ANYSOCK)) == NULL ||	    (tcptransp = svctcp_create(RPC_ANYSOCK, 0, 0)) == NULL) {		syslog(LOG_ERR, "Can't create socket");		exit(1);	}	pmap_unset(RPCPROG_MNT, RPCMNT_VER1);	if (!svc_register(udptransp, RPCPROG_MNT, RPCMNT_VER1, mntsrv,	    IPPROTO_UDP) ||	    !svc_register(tcptransp, RPCPROG_MNT, RPCMNT_VER1, mntsrv,	    IPPROTO_TCP)) {		syslog(LOG_ERR, "Can't register mount");		exit(1);	}	svc_run();	syslog(LOG_ERR, "Mountd died");	exit(1);}