1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Andreas Huber
2009-05-19 11:06:30 +02:00
committed by Stefan Roese
parent c06326c73b
commit 0850301747

View 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",