Re: [RFD] What error should FS return when I/O failure occurs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: pgpljr1xu2i6b.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux