lkml.org 
[lkml]   [2005]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFD] What error should FS return when I/O failure occurs?
From
Date
On Wed, 18 May 2005 13:10:24 EDT, fs said:

> For each test case, different FS returns different result.
> From user's perspective, it's really annoying, so, there should be a
> standard which constraints the error type. Otherwise, different fs
> can return whatever they want, regardless of the user's need.

Which does the user "need":

a) an 'errno' valye that's forced to be one of a specific subset of values,
even if none of them explain what's going on

or

b) an 'errno' value that actually tells you about the error?

Remember - if the *kernel* forces a -EROFS to become a -EIO, then userspace
is stuck with that value. If the kernel passes -EROFS back to userspace,
then after glibc stashes an EROFS into errno, either glibc or the application
program can insert a 'if (errno == EROFS) {errno = EIO;}' if it feels that
EROFS is unnatural.

And in any case, that's what the *application programmer* needs. What the *user*
needs is for the file to either be safely stored, or a dialog box put up saying
that it failed....
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-05-18 10:02    [W:5.860 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site