From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Fri, 10 Jun 2005 10:10:01 -0500 From: Eric Van Hensbergen To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Cc: v9fs-developer@lists.sourceforge.net, inferno-list@vitanuova.com Subject: [9fans] [RFD] Standardizing core error strings Topicbox-Message-UUID: 5d62982e-ead0-11e9-9d60-3106f5b1d025 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[] =3D "authentication failed"; char Ebadfid[] =3D "fid unknown or out of range"; char Ebadoffset[] =3D "bad offset in directory read"; char Ebadusefid[] =3D "bad use of fid"; char Edirchange[] =3D "wstat can't convert between files and directorie= s"; ... 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