9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] [RFD] Standardizing core error strings
@ 2005-06-10 15:10 Eric Van Hensbergen
  2005-06-11  3:10 ` Ronald G. Minnich
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Van Hensbergen @ 2005-06-10 15:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs; +Cc: v9fs-developer, inferno-list

I'd really like to start an effort to standardize core error strings
for file servers - this core subset would be designed for use by core
error messages for u9fs, vacfs, fossil, and kfs -- but could be used
as the core subset for other application file servers.  Right now, the
error strings are scattered in various .c files -- for example from
u9fs.c:

char    Eauth[] =       "authentication failed";
char    Ebadfid[] =     "fid unknown or out of range";
char    Ebadoffset[] =  "bad offset in directory read";
char    Ebadusefid[] =  "bad use of fid";
char    Edirchange[] =  "wstat can't convert between files and directories";
 ...

The idea would be to create an error.h (or fs-error.h or whatever)
which combines these core definitions from the various file servers
and hopefully reduce any unnecessary duplication (and/or minor
differences in the strings).

A couple of my reasons for this:
a) it makes sense - duplication of error strings all over the source
code is silly
b) it'll help v9fs - we have to map error strings to Linux errno's,
and right now our mapping table is over 100 lines long

I'm NOT proposing we restrict file servers (or any other applications)
from having their own custom error messages as they see fit -- just
that they use the core error messages (from /sys/include/fs-error.h)
when applicable.

Inferno had something like this (os/port/error.h and emu/port/error.h)
-- probably be a good idea to try and come to some agreement with
those folks as well (adding them to cc: list)

       -eric


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

end of thread, other threads:[~2005-06-12 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-10 15:10 [9fans] [RFD] Standardizing core error strings Eric Van Hensbergen
2005-06-11  3:10 ` Ronald G. Minnich
2005-06-12 21:50   ` boyd, rounin

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).