lkml.org 
[lkml]   [2005]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC/PATCH 0/5] read/write on attribute w/o show/store should return -ENOSYS
From
Date
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-28 19:48    [W:0.113 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site