Messages in this thread | | | Subject | Re: [RFD] What error should FS return when I/O failure occurs? | From | Valdis.Kletnieks@vt ... | Date | Wed, 18 May 2005 03:57:22 -0400 |
| |
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] | |