[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v1 1/1] block: Add numeric errno field to BLOCK_
Re: [Qemu-block] [PATCH v1 1/1] block: Add numeric errno field to BLOCK_IO_ERROR events
Thu, 21 Dec 2017 19:15:24 -0600
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0
On 12/21/2017 07:08 PM, Eric Blake wrote:
+# @errno: int describing the error cause, provided for applications.
+# (Note: while most errnos are posix compliant between OSs, it
+# is possible some errno values can vary among different OSs.)
+# (since 2.12)
The proof is in the pudding - if your documentation has to give this big
disclaimer, then what you are adding is not portable and should not be
added in that manner.
To follow up to myself, POSIX explicitly says that errno values are
implementation dependent, and there is NO requirement that errno value 1
be EPERM, for example. And while qemu does not target GNU Hurd, that is
a classic example of a system where errno values intentionally do not
fit in 8 bits. So you can't argue that there are "POSIX-compliant errno
values", because POSIX doesn't mandate specific values.
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org