cwfs: ignore nvram check error

This commit is contained in:
cinap_lenrek 2011-04-17 10:50:35 +00:00
parent 95758309f3
commit 65b058830b

View file

@ -919,11 +919,14 @@ dodevcopy(void)
return 0; return 0;
} }
static void static int
setconfig(char *dev) setconfig(char *dev)
{ {
if (dev != nil && !testconfig(dev)) if (dev && !testconfig(dev)){
nvrsetconfig(dev); /* if it fails, it will complain */ nvrsetconfig(dev); /* if it fails, it will complain */
return 0;
}
return -1;
} }
void void
@ -934,14 +937,10 @@ arginit(void)
char word[Maxword+1], *cp; char word[Maxword+1], *cp;
Filsys *fs; Filsys *fs;
if(nvrcheck() == 0) { nvrcheck();
setconfig(conf.confdev); if(!setconfig(conf.confdev) && !conf.configfirst)
if (!conf.configfirst) return;
return;
}
/* nvr was bad or invoker requested configuration step */
setconfig(conf.confdev);
for (;;) { for (;;) {
print("config: "); print("config: ");
if ((line = Brdline(&bin, '\n')) == nil) if ((line = Brdline(&bin, '\n')) == nil)