mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
d0f0d2f428
The result of async io returned in the event.res in addition to the number of bytes read/written provides negated error number. The broken libaio defines event.res as unsigned while the same structure in the kernel defines it as signed. The kernel indeed treats it as signed, and returns the negated error number. Till libaio is fixed we provide the signed long temp var. Also set errno for each error condition in aio_rw, as the caller is not aio aware and expects ret(-1)+errno by the traditional libc convention. Signed-off-by: Felix Blyakher <felixb@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>