Re: [RFC/PATCH 0/5] read/write on attribute w/o show/store shouldreturn -ENOSYS

From: Robert Love
Date: Thu Apr 28 2005 - 12:45:58 EST


On Thu, 2005-04-28 at 10:26 -0700, Greg KH wrote:

> What is the POSIX standard for this? ENOSYS or EACCESS?
>
> Or anyone have a link that I can look this up at?

ENOSYS isn't defined by SUSv3 (and thus not POSIX) for write(2).

EACCESS is defined only for socket errors, but you could of course
hijack it. I think it is silly, though, since the open(2) succeeded.
Ideally, the open for writing should fail with EACCESS.

EIO actually means that an internal or physical I/O error occurred, PLUS
it is reserved for implementation-defined errors. So that makes sense.

The main thing is to _not_ return zero. That would cause stdio to
resubmit indefinitely.

Robert Love


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/