13 fprint(2, "usage: %s [-dsR] [-f dbgfile] [-m msize] [-r root] "
14 "[-S srvfile] [-P exclusion-file]\n", argv0);
19 main(int argc, char **argv)
21 char *dbfile, *srv, *srvfdfile;
24 dbfile = "/tmp/exportdb";
35 dbfile = EARGF(usage());
39 messagesize = strtoul(EARGF(usage()), nil, 0);
51 /* accepted but ignored, for backwards compatibility */
55 patternfile = EARGF(usage());
65 srvfdfile = EARGF(usage());
75 fprint(2, "exportfs: -S cannot be used with -r or -s\n");
78 if((srvfd = open(srvfdfile, ORDWR)) < 0)
79 fatal("open %s: %r", srvfdfile);
86 n = create(dbfile, OWRITE|OTRUNC, 0666);
91 DEBUG(DFD, "exportfs: started\n");
93 rfork(RFNOTEG|RFREND);
96 messagesize = iounit(0);
98 messagesize = 8192+IOHDRSZ;
100 fhash = emallocz(sizeof(Fid*)*FHASHSIZE);
102 fmtinstall('F', fcallfmt);
108 errstr(ebuf, sizeof ebuf);
109 DEBUG(DFD, "chdir(\"%s\"): %s\n", srv, ebuf);
112 DEBUG(DFD, "invoked as server for %s", srv);
115 DEBUG(DFD, "\niniting root\n");