From: Stefan Roese Date: Tue, 19 May 2009 11:34:44 +0200 Subject: [U-Boot] [PATCH] UBI: fix return code in ubi_volume_read Message-ID: <1242725684-28908-1-git-send-email-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Andreas Huber Return -ENODEV instead of 0 when trying to read from a non existing volume. Signed-off-by: Andreas Huber Signed-off-by: Stefan Roese --- common/cmd_ubi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/common/cmd_ubi.c b/common/cmd_ubi.c index 02a2e55..64a7307 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", -- 1.6.2.5