From: Andreas Huber Date: Tue, 19 May 2009 09:06:30 +0000 (+0200) Subject: UBI: fix return code in ubi_volume_read X-Git-Tag: v2009.06-rc3~27^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0850301747228a3327f2815a85284d26ade3de95;p=oweals%2Fu-boot.git UBI: fix return code in ubi_volume_read Return -ENODEV instead of 0 when trying to read from a non existing volume. Signed-off-by: Andreas Huber Signed-off-by: Stefan Roese --- diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c index 02a2e55b50..64a730724c 100644 --- a/common/cmd_ubi.c +++ b/common/cmd_ubi.c @@ -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",