sandbox: Return error code from read/write/seek
The existing API for these functions is different from the rest of
U-Boot, in that any error code must be obtained from the errno variable
on failure. This variable is part of the C library, so accessing it
outside of the special 'sandbox' shim-functions is not ideal.
Adjust the API to return an error code, to avoid this. Update existing
uses to check for any negative value, rather than just -1.
Signed-off-by:
Simon Glass <sjg@chromium.org>
Showing
- arch/sandbox/cpu/os.c 21 additions, 3 deletionsarch/sandbox/cpu/os.c
- arch/sandbox/cpu/spl.c 7 additions, 9 deletionsarch/sandbox/cpu/spl.c
- drivers/block/sandbox.c 2 additions, 2 deletionsdrivers/block/sandbox.c
- drivers/usb/emul/sandbox_flash.c 1 addition, 1 deletiondrivers/usb/emul/sandbox_flash.c
- fs/sandbox/sandboxfs.c 3 additions, 3 deletionsfs/sandbox/sandboxfs.c
- include/os.h 3 additions, 3 deletionsinclude/os.h
Loading
Please register or sign in to comment