This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] [PATCH] Make lio_listio set errno to EIO on requests with invalid aio_lio_opcode
- From: Mark Brown <bmark2 at us dot ibm dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Mon, 27 Feb 2006 11:22:26 -0600
- Subject: Re: [RFC] [PATCH] Make lio_listio set errno to EIO on requests with invalid aio_lio_opcode
- Reply-to: bmark at us dot ibm dot com
Ulrich wrote:
> Suzuki wrote:
> > If the opcode is not supported then that I/O operation should fail. For
> > those requests, since we know that I/O operation has failed, even before
> > enqueuing a request, shouldn't lio_listio() return EIO ?
>
> No, there is no such requirement. The current code is correct and if a
> program has problems it is that program's fault.
So the following doesn't apply? I know it's rationale, but it directs as to
the proper use of EIO....
----- quote from SUSv3 (TC2), System Interfaces, P697 lines 23139-23147 ----
Although it may appear that there are inconsistencies in the specified
circumstances for error codes, the [EIO] error condition applies when any
circumstance relating to an individual operation makes that operation fail.
This might be due to a badly formulated request (for example, the
aio_lio_opcode field is invalid, and aio_error ( ) returns [EINVAL]) or
might arise from application behavior (for example, the file descriptor is
closed before the operation is initiated, and aio_error ( ) returns [EBADF]).
--
Mark Brown/Austin
bmark@us.ibm.com