summaryrefslogtreecommitdiff
path: root/common/cmd_ubi.c
diff options
context:
space:
mode:
authorAndreas Huber <andreas.huber@keymile.com>2009-05-19 11:06:30 +0200
committerStefan Roese <sr@denx.de>2009-05-20 13:01:58 +0200
commit0850301747228a3327f2815a85284d26ade3de95 (patch)
tree797ee99b564e75cbc9d57074c9efca57937747f0 /common/cmd_ubi.c
parentc06326c73bf90e48a8e1cf8893ad31c575423f50 (diff)
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 <andreas.huber@keymile.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common/cmd_ubi.c')
-rw-r--r--common/cmd_ubi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c
index 02a2e55b502..64a730724c6 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",