9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port)
@ 2021-10-05  9:33 igor
  2021-10-05 18:33 ` cinap_lenrek
  0 siblings, 1 reply; 2+ messages in thread
From: igor @ 2021-10-05  9:33 UTC (permalink / raw)
  To: 9front; +Cc: igor

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

The below is a recent patch from plan9port to sam:
 * https://github.com/9fans/plan9port/commit/d3ee9f70e4ee00bd12557910c9e3dcc1fabd53c7

It fixes a spurious overwrite message.

<snip>
From: Igor Böhm <igor@9lab.org>
Date: Tue, 05 Oct 2021 09:27:45 +0000
Subject: [PATCH] sam: fix spurious overwrite message (patch from plan9port)


Fixes:

% sam -d
 -.
w /tmp/foo
/tmp/foo: (new file) #0
w /tmp/foo
?warning: write might change good version of `/tmp/foo'
---
diff 6ebb8b9e357944cc29ae3fafc0900ee3e325ed39 d05fc0e9d203f79eef0d3fc6ce7edcd493b30101
--- a/sys/src/cmd/sam/io.c	Sun Oct  3 17:58:58 2021
+++ b/sys/src/cmd/sam/io.c	Tue Oct  5 11:27:45 2021
@@ -66,7 +66,7 @@
 		warn(Wnotnewline);
 	closeio(n);
 	if(f->name.s[0]==0 || samename){
-		if(statfile(name, &dev, &qid, &mtime, 0, 0) > 0){
+		if(statfile(genc, &dev, &qid, &mtime, 0, 0) > 0){
 			f->dev = dev;
 			f->qidpath = qid;
 			f->mtime = mtime;
</snip>

Cheers,
Igor

[-- Attachment #2: sam.spurious.msg.patch --]
[-- Type: text/plain, Size: 723 bytes --]

From: Igor Böhm <igor@9lab.org>
Date: Tue, 05 Oct 2021 09:27:45 +0000
Subject: [PATCH] sam: fix spurious overwrite message (patch from plan9port)


Fixes:

% sam -d
 -.
w /tmp/foo
/tmp/foo: (new file) #0
w /tmp/foo
?warning: write might change good version of `/tmp/foo'
---
diff 6ebb8b9e357944cc29ae3fafc0900ee3e325ed39 d05fc0e9d203f79eef0d3fc6ce7edcd493b30101
--- a/sys/src/cmd/sam/io.c	Sun Oct  3 17:58:58 2021
+++ b/sys/src/cmd/sam/io.c	Tue Oct  5 11:27:45 2021
@@ -66,7 +66,7 @@
 		warn(Wnotnewline);
 	closeio(n);
 	if(f->name.s[0]==0 || samename){
-		if(statfile(name, &dev, &qid, &mtime, 0, 0) > 0){
+		if(statfile(genc, &dev, &qid, &mtime, 0, 0) > 0){
 			f->dev = dev;
 			f->qidpath = qid;
 			f->mtime = mtime;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port)
  2021-10-05  9:33 [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port) igor
@ 2021-10-05 18:33 ` cinap_lenrek
  0 siblings, 0 replies; 2+ messages in thread
From: cinap_lenrek @ 2021-10-05 18:33 UTC (permalink / raw)
  To: 9front

looks ok.

--
cinap

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-05 18:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-05  9:33 [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port) igor
2021-10-05 18:33 ` cinap_lenrek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).