9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Eric Van Hensbergen <ericvh@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Cc: v9fs-developer@lists.sourceforge.net, inferno-list@vitanuova.com
Subject: [9fans] [RFD] Standardizing core error strings
Date: Fri, 10 Jun 2005 10:10:01 -0500	[thread overview]
Message-ID: <a4e6962a05061008107ccf0532@mail.gmail.com> (raw)

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


             reply	other threads:[~2005-06-10 15:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-10 15:10 Eric Van Hensbergen [this message]
2005-06-11  3:10 ` Ronald G. Minnich
2005-06-12 21:50   ` boyd, rounin

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=a4e6962a05061008107ccf0532@mail.gmail.com \
    --to=ericvh@gmail.com \
    --cc=9fans@cse.psu.edu \
    --cc=inferno-list@vitanuova.com \
    --cc=v9fs-developer@lists.sourceforge.net \
    /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).