Commit 7d6a36a4 authored by Clément Péron's avatar Clément Péron Committed by Stefano Babic
Browse files

imx: ahab: allow to bypass confirmation for ahab_close cmd



Calling ahab_close cmd force the user to interact for confirmation.

This is not user-friendly when using this cmd during factory process.

Allow the user to pass '-y' option to bypass this confirmation.
Signed-off-by: default avatarClément Péron <peron.clem@gmail.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Acked-by: default avatarOliver Graute <oliver.graute@kococonnector.com>
parent 717bf50f
...@@ -303,10 +303,11 @@ static int confirm_close(void) ...@@ -303,10 +303,11 @@ static int confirm_close(void)
static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc, static int do_ahab_close(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[]) char *const argv[])
{ {
int confirmed = argc >= 2 && !strcmp(argv[1], "-y");
int err; int err;
u16 lc; u16 lc;
if (!confirm_close()) if (!confirmed && !confirm_close())
return -EACCES; return -EACCES;
err = sc_seco_chip_info(-1, &lc, NULL, NULL, NULL); err = sc_seco_chip_info(-1, &lc, NULL, NULL, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment