Return value -1 cause U-Boot to print usage message. Return value
1 (CMD_RET_FAILURE) indicates failure. So fix return value when ubifs
command starts it execution and fails.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
ret = uboot_ubifs_mount(vol_name);
if (ret)
- return -1;
+ return CMD_RET_FAILURE;
ubifs_mounted = 1;
{
if (ubifs_initialized == 0) {
printf("No UBIFS volume mounted!\n");
- return -1;
+ return CMD_RET_FAILURE;
}
uboot_ubifs_umount();
if (!ubifs_mounted) {
printf("UBIFS not mounted, use ubifsmount to mount volume first!\n");
- return -1;
+ return CMD_RET_FAILURE;
}
if (argc == 2)
if (!ubifs_mounted) {
printf("UBIFS not mounted, use ubifs mount to mount volume first!\n");
- return -1;
+ return CMD_RET_FAILURE;
}
if (argc < 3)