git: 9front

Download patch

ref: a18ebca9975a2a87246836c727da025fad263111
parent: 2ae2e5f856f8f95f8d780f9ffe0a0ebb634ffb1a
author: cinap_lenrek <cinap_lenrek@localhost>
date: Sun Apr 17 06:50:35 EDT 2011

cwfs: ignore nvram check error

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