void
usage(void)
{
- fprint(2, "usage: %s [-dsR] [-f dbgfile] [-m msize] [-r root] "
- "[-S srvfile] [-P exclusion-file]\n", argv0);
+ fprint(2, "usage: %s [-dsR] [-m msize] [-r root] "
+ "[-P patternfile] [-S srvfile]\n", argv0);
fatal("usage");
}
void
main(int argc, char **argv)
{
- char *dbfile, *srv, *srvfdfile;
- int n;
+ char *srv, *srvfdfile;
- dbfile = "/tmp/exportdb";
srv = nil;
srvfd = -1;
srvfdfile = nil;
dbg++;
break;
- case 'f':
- dbfile = EARGF(usage());
- break;
-
case 'm':
messagesize = strtoul(EARGF(usage()), nil, 0);
break;
exclusions();
- if(dbg) {
- n = create(dbfile, OWRITE|OTRUNC, 0666);
- dup(n, DFD);
- close(n);
- }
-
- DEBUG(DFD, "exportfs: started\n");
+ DEBUG(2, "exportfs: started\n");
rfork(RFNOTEG|RFREND);
char ebuf[ERRMAX];
ebuf[0] = '\0';
errstr(ebuf, sizeof ebuf);
- DEBUG(DFD, "chdir(\"%s\"): %s\n", srv, ebuf);
+ DEBUG(2, "chdir(\"%s\"): %s\n", srv, ebuf);
mounterror(ebuf);
}
- DEBUG(DFD, "invoked as server for %s", srv);
+ DEBUG(2, "invoked as server for %s", srv);
}
- DEBUG(DFD, "\niniting root\n");
+ DEBUG(2, "\niniting root\n");
initroot();
io();
}