History

remove unreachable sysfatal() calls after exportfs(), exits(nil) on eof in exportfs

cinap_lenrek committed 10 years ago

Commit 2b60f931 parent bff12ec3 files · +8 −10Browse files

Unified · Split

3 files
  1. cpu.c +0 −2
  2. exportfs/exportfs.c +7 −7
  3. exportfs/exportfs.h +1 −1
cpu.c+0−2
@@ -148,7 +148,6 @@ rcpu(char *host) · 147 unmodified lines
148 148
149 /* Begin serving the namespace */149 /* Begin serving the namespace */
150 exportfs(fd);150 exportfs(fd);
151 sysfatal("starting exportfs: %r");
152}151}
153 152
154void153void
@@ -202,7 +201,6 @@ ncpu(char *host) · 47 unmodified lines
202 201
203 /* Begin serving the gnot namespace */202 /* Begin serving the gnot namespace */
204 exportfs(fd);203 exportfs(fd);
205 sysfatal("starting exportfs: %r");
206}204}
207 205
208void206void
exportfs/exportfs.c+7−7
@@ -80,7 +80,7 @@ exportfs(int fd) · 79 unmodified lines
80 DEBUG(DFD, "read9p...");80 DEBUG(DFD, "read9p...");
81 n = read9pmsg(netfd, r->buf, messagesize);81 n = read9pmsg(netfd, r->buf, messagesize);
82 if(n <= 0)82 if(n <= 0)
83 fatal("eof: n=%d %r", n);83 fatal(nil);
84 84
85 if(convM2S(r->buf, n, &r->work) == 0){85 if(convM2S(r->buf, n, &r->work) == 0){
86 iprint("convM2S %d byte message\n", n);86 iprint("convM2S %d byte message\n", n);
@@ -489,7 +489,7 @@ fatal(char *s, ...) · 402 unmodified lines
489 char buf[ERRMAX];489 char buf[ERRMAX];
490 va_list arg;490 va_list arg;
491 491
492 if (s) {492 if (s != nil) {
493 va_start(arg, s);493 va_start(arg, s);
494 vsnprint(buf, ERRMAX, s, arg);494 vsnprint(buf, ERRMAX, s, arg);
495 va_end(arg);495 va_end(arg);
@@ -499,10 +499,10 @@ fatal(char *s, ...) · 3 unmodified lines
499// for(m = Proclist; m; m = m->next)499// for(m = Proclist; m; m = m->next)
500// postnote(PNPROC, m->pid, "kill");500// postnote(PNPROC, m->pid, "kill");
501 501
502 DEBUG(DFD, "%s\n", buf);502 if (s != nil) {
503 if (s) 503 DEBUG(DFD, "%s\n", buf);
504 sysfatal(buf);504 sysfatal("%s", buf);
505 else505 } else
506 sysfatal("");506 exits(nil);
507}507}
508 508
exportfs/exportfs.h+1−1
@@ -145,4 +145,4 @@ int readmessage(int, char*, int); · 144 unmodified lines
145 145
146#define notify(x)146#define notify(x)
147#define noted(x)147#define noted(x)
148#define exits(x)148