From: Fazlul Shahriar <fshahriar@gmail.com>
To: 9front@9front.org
Subject: [PATCH] ramfs: change Elocked error string to Go expectation
Date: Thu, 11 Jun 2020 16:02:50 -0400 [thread overview]
Message-ID: <20200611200250.GA114633@delta.localdomain> (raw)
Go expects the error to be one of the three errors returned in
Bell Labs Plan 9. As listed in
https://github.com/golang/go/blob/f7ba82d68f90e20aa9e6aa973cb6f12321abec71/src/cmd/go/internal/lockedfile/lockedfile_plan9.go#L16:
// Opening an exclusive-use file returns an error.
// The expected error strings are:
//
// - "open/create -- file is locked" (cwfs, kfs)
// - "exclusive lock" (fossil)
// - "exclusive use file already open" (ramfs)
var lockedErrStrings = [...]string{
"file is locked",
"exclusive lock",
"exclusive use file already open",
}
diff -r 23bc1d0e2dd2 sys/src/cmd/ramfs.c
--- a/sys/src/cmd/ramfs.c Tue Jun 09 12:23:24 2020 -0700
+++ b/sys/src/cmd/ramfs.c Thu Jun 11 15:50:56 2020 -0400
@@ -11,7 +11,7 @@
char Enomem[] = "no memory";
char Eperm[] = "permission denied";
char Enotowner[] = "not owner";
-char Elocked[] = "file locked";
+char Elocked[] = "file is locked";
enum {
Tdat = 0xbabababa,
next reply other threads:[~2020-06-11 20:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-11 20:02 Fazlul Shahriar [this message]
2020-06-11 20:06 ` [9front] " Kurt H Maier
2020-06-11 23:37 ` 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=20200611200250.GA114633@delta.localdomain \
--to=fshahriar@gmail.com \
--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).