UBI: fix return code in ubi_volume_read
PATCH 1/1 UBI: fix return code in ubi_volume_read
From: Andreas Huber <[email protected]>
Return -ENODEV instead of 0 when trying to read from a non existing volume.
Signed-off-by Andreas Huber <[email protected]>
Signed-off-by Stefan Roese <[email protected]>
--- common/cmd_ubi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_ubi.c +1 -1
@@ -327,7 +327,7 @@ static int ubi_volume_read(char *volume, char *buf, size_t size) }if (i == ubi->vtbl_slots) {printf ("%s volume not found\n" , volume); -return 0 ; +return -ENODEV ; } printf("read %i bytes from volume %d to %x(buf address)\n",
Signature · 1 line
1.6.2.5