From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 12658 invoked from network); 5 Oct 2021 10:19:46 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 5 Oct 2021 10:19:46 -0000 Received: from mail.9lab.org ([168.119.8.41]) by 4ess; Tue Oct 5 06:08:34 -0400 2021 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9lab.org; s=20210803; t=1633426566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=veCX8sAcclPiS+zIbB8EZySGYULRHDT+TZyWyoQvG5s=; b=hZFnO3yMUkLaQQpO7IyBZ1KJA4PG/nShfnyc/xmH3TcYvyXiGOI2ZPmkB7KV5CuPAF1UGo 2NvacLj545N3pgzvo7djZvmA4cxamCCRACUFM7Wtiw5Fk9ExUXCOzB22jQFfsvCH/wmOQ0 FxbxVHxxEdyFrLpSf+Uv7/7rUWsein8= Received: from pjw (host-185-64-155-70.ecsnet.at [185.64.155.70]) by mail.9lab.org (OpenSMTPD) with ESMTPSA id f9492478 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO); Tue, 5 Oct 2021 11:36:06 +0200 (CEST) Message-ID: <2485C490793E93ED1DA515F79252E124@9lab.org> To: 9front@9front.org CC: igor@9lab.org Date: Tue, 05 Oct 2021 11:33:45 +0200 From: igor@9lab.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-mtinxpqvopfyurliesuzwgnfny" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: proven webscale CSS engine Subject: [9front] [PATCH] sam: fix spurious overwrite message (patch from plan9port) Reply-To: 9front@9front.org Precedence: bulk This is a multi-part message in MIME format. --upas-mtinxpqvopfyurliesuzwgnfny Content-Disposition: inline Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit The below is a recent patch from plan9port to sam: * https://github.com/9fans/plan9port/commit/d3ee9f70e4ee00bd12557910c9e3dcc1fabd53c7 It fixes a spurious overwrite message. From: Igor Böhm 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; Cheers, Igor --upas-mtinxpqvopfyurliesuzwgnfny Content-Disposition: attachment; filename=sam.spurious.msg.patch Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit From: Igor Böhm 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; --upas-mtinxpqvopfyurliesuzwgnfny--