[PATCH 1/3] commands: ubi: ubiupdatevol: Reduce error code to 0 or 1

Daniel Schultz d.schultz at phytec.de
Mon Jan 29 05:04:09 PST 2018


do_ubiupdatevol can either return 0 or the ioctl return value. This is
not in conformity with the other ubi comannds return values.

Signed-off-by: Daniel Schultz <d.schultz at phytec.de>
---
 commands/ubi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/ubi.c b/commands/ubi.c
index 5e27584..de5633c 100644
--- a/commands/ubi.c
+++ b/commands/ubi.c
@@ -82,7 +82,7 @@ error:
 	close(fd_vol);
 error_img:
 	close(fd_img);
-	return ret;
+	return ret ? 1 : 0;
 }
 
 
-- 
2.7.4




More information about the barebox mailing list