]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
UBI: fix return code in ubi_volume_read
authorAndreas Huber <andreas.huber@keymile.com>
Tue, 19 May 2009 09:06:30 +0000 (11:06 +0200)
committerStefan Roese <sr@denx.de>
Wed, 20 May 2009 11:01:58 +0000 (13:01 +0200)
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>
common/cmd_ubi.c

index 02a2e55b50264239083250e666098f50631869b0..64a730724c6e9cd3af24885bf9dfa33032b10e99 100644 (file)
@@ -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",