Browse Source

Plan 9 from Bell Labs 2008-09-27

David du Colombier 12 years ago
parent
commit
c5ec228fbe
5 changed files with 14 additions and 7 deletions
  1. 2 2
      dist/replica/_plan9.db
  2. 2 2
      dist/replica/plan9.db
  3. 2 0
      dist/replica/plan9.log
  4. 7 2
      sys/src/cmd/diff/diffdir.c
  5. 1 1
      sys/src/cmd/diff/main.c

+ 2 - 2
dist/replica/_plan9.db

@@ -10234,10 +10234,10 @@ sys/src/cmd/dict/utils.c - 664 sys sys 1100894437 14345
 sys/src/cmd/dict/world.c - 664 sys sys 944960882 4264
 sys/src/cmd/diff - 20000000775 sys sys 1196687804 0
 sys/src/cmd/diff/diff.h - 664 sys sys 1106723609 794
-sys/src/cmd/diff/diffdir.c - 664 sys sys 1014925333 1791
+sys/src/cmd/diff/diffdir.c - 664 sys sys 1222453396 1895
 sys/src/cmd/diff/diffio.c - 664 sys sys 1114696977 6599
 sys/src/cmd/diff/diffreg.c - 664 sys sys 1114037841 8825
-sys/src/cmd/diff/main.c - 664 sys sys 1134659792 4338
+sys/src/cmd/diff/main.c - 664 sys sys 1222453385 4346
 sys/src/cmd/diff/mkfile - 664 sys sys 944960882 141
 sys/src/cmd/disk - 20000000775 sys sys 1196687809 0
 sys/src/cmd/disk/9660 - 20000000775 sys sys 1196687808 0

+ 2 - 2
dist/replica/plan9.db

@@ -10234,10 +10234,10 @@ sys/src/cmd/dict/utils.c - 664 sys sys 1100894437 14345
 sys/src/cmd/dict/world.c - 664 sys sys 944960882 4264
 sys/src/cmd/diff - 20000000775 sys sys 1196687804 0
 sys/src/cmd/diff/diff.h - 664 sys sys 1106723609 794
-sys/src/cmd/diff/diffdir.c - 664 sys sys 1014925333 1791
+sys/src/cmd/diff/diffdir.c - 664 sys sys 1222453396 1895
 sys/src/cmd/diff/diffio.c - 664 sys sys 1114696977 6599
 sys/src/cmd/diff/diffreg.c - 664 sys sys 1114037841 8825
-sys/src/cmd/diff/main.c - 664 sys sys 1134659792 4338
+sys/src/cmd/diff/main.c - 664 sys sys 1222453385 4346
 sys/src/cmd/diff/mkfile - 664 sys sys 944960882 141
 sys/src/cmd/disk - 20000000775 sys sys 1196687809 0
 sys/src/cmd/disk/9660 - 20000000775 sys sys 1196687808 0

+ 2 - 0
dist/replica/plan9.log

@@ -36116,3 +36116,5 @@
 1221661805 0 c sys/src/9/port/allocb.c - 664 sys sys 1221660911 3451
 1222187404 0 c sys/src/cmd/file.c - 664 sys sys 1222186474 28992
 1222198205 0 c 386/bin/file - 775 sys sys 1222197005 128278
+1222461005 0 c sys/src/cmd/diff/diffdir.c - 664 sys sys 1222453396 1895
+1222461005 1 c sys/src/cmd/diff/main.c - 664 sys sys 1222453385 4346

+ 7 - 2
sys/src/cmd/diff/diffdir.c

@@ -19,8 +19,13 @@ scandir(char *name)
 	int nitems;
 	int fd, n;
 
-	if ((fd = open(name, OREAD)) < 0)
-		panic(2, "can't open %s\n", name);
+	if ((fd = open(name, OREAD)) < 0) {
+		fprint(2, "%s: can't open %s: %r\n", argv0, name);
+		/* fake an empty directory */
+		cp = MALLOC(char*, 1);
+		cp[0] = 0;
+		return cp;
+	}
 	cp = 0;
 	nitems = 0;
 	if((n = dirreadall(fd, &db)) > 0){

+ 1 - 1
sys/src/cmd/diff/main.c

@@ -182,7 +182,7 @@ main(int argc, char *argv[])
 	Dir *fsb, *tsb;
 
 	Binit(&stdout, 1, OWRITE);
-	progname = *argv;
+	progname = argv0 = *argv;
 	while (--argc && (*++argv)[0] == '-' && (*argv)[1]) {
 		for (p = *argv+1; *p; p++) {
 			switch (*p) {