Browse Source

Plan 9 from Bell Labs 2004-04-14

David du Colombier 20 years ago
parent
commit
c11e296488
3 changed files with 12 additions and 10 deletions
  1. 1 1
      dist/replica/plan9.db
  2. 1 0
      dist/replica/plan9.log
  3. 10 9
      sys/src/9/port/devfs.c

+ 1 - 1
dist/replica/plan9.db

@@ -5446,7 +5446,7 @@ sys/src/9/port/devcons.c - 664 sys sys 1072704673 22374
 sys/src/9/port/devdraw.c - 664 sys sys 1039753332 41987
 sys/src/9/port/devdup.c - 664 sys sys 1014931172 2332
 sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
-sys/src/9/port/devfs.c - 664 sys sys 1067722764 10760
+sys/src/9/port/devfs.c - 664 sys sys 1081864735 10779
 sys/src/9/port/devkbmap.c - 644 sys sys 1079463756 2774
 sys/src/9/port/devkprof.c - 664 sys sys 1014931173 3111
 sys/src/9/port/devloopback.c - 664 sys sys 1076612248 14573

+ 1 - 0
dist/replica/plan9.log

@@ -14906,3 +14906,4 @@
 1081740746 0 c 386/lib/libmp.a - 664 sys sys 1081739421 77700
 1081827182 0 c 386/bin/acid - 775 sys sys 1081825815 379877
 1081827182 1 c 386/bin/echo - 775 sys sys 1081825815 55569
+1081864972 0 c sys/src/9/port/devfs.c - 664 sys sys 1081864735 10779

+ 10 - 9
sys/src/9/port/devfs.c

@@ -241,7 +241,8 @@ rdconf(void)
 	char	*c;
 	char	*p;
 	char	*e;
-	Chan	*cc;
+	Chan *cc;
+	Chan **ccp;
 
 	s = getconf("fsconfig");
 	if (s == nil){
@@ -249,23 +250,23 @@ rdconf(void)
 		s = "/dev/sdC0/fscfg";
 	} else
 		mustrd = 1;
-	cc = nil;
+	ccp = &cc;
+	*ccp = nil;
 	c = nil;
 	if (waserror()){
 		configed = 1;
-		if (cc != nil)
-			cclose(cc);
+		if (*ccp != nil)
+			cclose(*ccp);
 		if (c)
 			free(c);
 		if (!mustrd)
 			return;
 		nexterror();
 	}
-	cc = namec(s, Aopen, OREAD, 0);
-	devtab[cc->type]->read(cc, confstr, sizeof(confstr), 0);
-	cclose(cc);
-	cc = nil;
-	USED(cc); // on errors
+	*ccp = namec(s, Aopen, OREAD, 0);
+	devtab[(*ccp)->type]->read(*ccp, confstr, sizeof(confstr), 0);
+	cclose(*ccp);
+	*ccp = nil;
 	if (strncmp(confstr, Cfgstr, strlen(Cfgstr)) != 0)
 		error("Bad config: should begin with: fsdev\\n");
 	kstrdup(&c, confstr + strlen(Cfgstr));