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>
master
Andreas Huber 16 years ago committed by Stefan Roese
parent c06326c73b
commit 0850301747
  1. 2
      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",

Loading…
Cancel
Save