int do_zboot_states(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[], int state_mask)
{
- int ret;
+ int ret = 0;
log_debug("state_mask %x\n", state_mask);
- if (flag & ZBOOT_STATE_START)
+ if (state_mask & ZBOOT_STATE_START)
ret = do_zboot_start(cmdtp, flag, argc, argv);
- if (!ret && (flag & ZBOOT_STATE_LOAD))
+ if (!ret && (state_mask & ZBOOT_STATE_LOAD))
ret = do_zboot_load(cmdtp, flag, argc, argv);
- if (!ret && (flag & ZBOOT_STATE_SETUP))
+ if (!ret && (state_mask & ZBOOT_STATE_SETUP))
ret = do_zboot_setup(cmdtp, flag, argc, argv);
- if (!ret && (flag & ZBOOT_STATE_INFO))
+ if (!ret && (state_mask & ZBOOT_STATE_INFO))
ret = do_zboot_info(cmdtp, flag, argc, argv);
- if (!ret && (flag & ZBOOT_STATE_GO))
+ if (!ret && (state_mask & ZBOOT_STATE_GO))
ret = do_zboot_go(cmdtp, flag, argc, argv);
if (ret)
return ret;