提交 08503017 编写于 作者: A Andreas Huber 提交者: Stefan Roese

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: NAndreas Huber <andreas.huber@keymile.com>
Signed-off-by: NStefan Roese <sr@denx.de>
上级 c06326c7
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册