From: igor@9lab.org
To: 9front@9front.org
Cc: igor@9lab.org
Subject: [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port)
Date: Tue, 05 Oct 2021 11:33:45 +0200 [thread overview]
Message-ID: <2485C490793E93ED1DA515F79252E124@9lab.org> (raw)
[-- 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;
next reply other threads:[~2021-10-05 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 9:33 igor [this message]
2021-10-05 18:33 ` cinap_lenrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2485C490793E93ED1DA515F79252E124@9lab.org \
--to=igor@9lab.org \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).