* [PATCH] ramfs: change Elocked error string to Go expectation
@ 2020-06-11 20:02 Fazlul Shahriar
2020-06-11 20:06 ` [9front] " Kurt H Maier
2020-06-11 23:37 ` cinap_lenrek
0 siblings, 2 replies; 3+ messages in thread
From: Fazlul Shahriar @ 2020-06-11 20:02 UTC (permalink / raw)
To: 9front
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-11 23:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 20:02 [PATCH] ramfs: change Elocked error string to Go expectation Fazlul Shahriar
2020-06-11 20:06 ` [9front] " Kurt H Maier
2020-06-11 23:37 ` 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).