浏览代码

Plan 9 from Bell Labs 2004-02-19

David du Colombier 21 年之前
父节点
当前提交
ffdab5f3b8
共有 3 个文件被更改,包括 6 次插入4 次删除
  1. 2 2
      dist/replica/plan9.db
  2. 2 0
      dist/replica/plan9.log
  3. 2 2
      sys/src/cmd/diff/main.c

+ 2 - 2
dist/replica/plan9.db

@@ -200,7 +200,7 @@
 386/bin/dial/expect - 775 sys sys 1068385869 58283
 386/bin/dial/pass - 775 sys sys 1068385869 39019
 386/bin/dict - 775 sys sys 1064598121 185384
-386/bin/diff - 775 sys sys 1064598122 82019
+386/bin/diff - 775 sys sys 1077163174 82769
 386/bin/disk - 20000000775 sys sys 984788664 0
 386/bin/disk/dump9660 - 775 sys sys 1064598123 151282
 386/bin/disk/exsort - 775 sys sys 1072729312 58501
@@ -7352,7 +7352,7 @@ sys/src/cmd/diff/diff.h - 664 sys sys 1014925333 769
 sys/src/cmd/diff/diffdir.c - 664 sys sys 1014925333 1791
 sys/src/cmd/diff/diffio.c - 664 sys sys 1014925334 5031
 sys/src/cmd/diff/diffreg.c - 664 sys sys 1014925334 8825
-sys/src/cmd/diff/main.c - 664 sys sys 1014925334 4270
+sys/src/cmd/diff/main.c - 664 sys sys 1077133741 4300
 sys/src/cmd/diff/mkfile - 664 sys sys 944960882 141
 sys/src/cmd/disk - 20000000775 sys sys 1018468546 0
 sys/src/cmd/disk/9660 - 20000000775 sys sys 1017681443 0

+ 2 - 0
dist/replica/plan9.log

@@ -13916,3 +13916,5 @@
 1077076872 0 c 386/bin/tail - 775 sys sys 1077076819 64685
 1077076872 1 c 386/lib/libc.a - 664 sys sys 1077076820 504454
 1077076872 2 c 386/lib/libmp.a - 664 sys sys 1077076820 77700
+1077134481 0 c sys/src/cmd/diff/main.c - 664 sys sys 1077133741 4300
+1077163284 0 c 386/bin/diff - 775 sys sys 1077163174 82769

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

@@ -8,7 +8,7 @@
 
 Biobuf	stdout;
 
-static char *tmp[] = {"/tmp/diff1", "/tmp/diff2"};
+static char *tmp[] = {"/tmp/diff1XXXXXXXXXXX", "/tmp/diff2XXXXXXXXXXX"};
 static int whichtmp;
 static char *progname;
 static char usage[] = "diff [ -efmnbwr ] file1 ... file2\n";
@@ -81,7 +81,7 @@ mktmpfile(int input, Dir **sb)
 	char buf[8192];
 
 	atnotify(catch, 1);
-	p = tmp[whichtmp++];
+	p = mktemp(tmp[whichtmp++]);
 	fd = create(p, OWRITE, 0600);
 	if (fd < 0) {
 		panic(mflag ? 0: 2, "cannot create %s: %r\n", p);