13 fprint(2, "usage: %s [-dsR] [-m msize] [-r root] "
14 "[-P patternfile] [-S srvfile]\n", argv0);
19 main(int argc, char **argv)
21 char *srv, *srvfdfile;
33 messagesize = strtoul(EARGF(usage()), nil, 0);
45 /* accepted but ignored, for backwards compatibility */
49 patternfile = EARGF(usage());
59 srvfdfile = EARGF(usage());
69 fprint(2, "exportfs: -S cannot be used with -r or -s\n");
72 if((srvfd = open(srvfdfile, ORDWR)) < 0)
73 fatal("open %s: %r", srvfdfile);
79 DEBUG(2, "exportfs: started\n");
81 rfork(RFNOTEG|RFREND);
84 messagesize = iounit(0);
86 messagesize = 8192+IOHDRSZ;
88 fhash = emallocz(sizeof(Fid*)*FHASHSIZE);
90 fmtinstall('F', fcallfmt);
96 errstr(ebuf, sizeof ebuf);
97 DEBUG(2, "chdir(\"%s\"): %s\n", srv, ebuf);
100 DEBUG(2, "invoked as server for %s", srv);
103 DEBUG(2, "\niniting root\n");