From: "Clément Péron" <peron.clem@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd
Date: Mon, 21 Dec 2020 18:31:28 +0100 [thread overview]
Message-ID: <20201221173128.354567-1-peron.clem@gmail.com> (raw)
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: Cl?ment P?ron <peron.clem@gmail.com>
---
v2:
- Fix commit log
---
arch/arm/mach-imx/imx8/ahab.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/imx8/ahab.c b/arch/arm/mach-imx/imx8/ahab.c
index cf3c7d762a74..b0865c2330a2 100644
--- a/arch/arm/mach-imx/imx8/ahab.c
+++ b/arch/arm/mach-imx/imx8/ahab.c
@@ -301,10 +301,11 @@ static int confirm_close(void)
static int do_ahab_close(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
+ int confirmed = argc >= 2 && !strcmp(argv[1], "-y");
int err;
u16 lc;
- if (!confirm_close())
+ if (!confirmed && !confirm_close())
return -EACCES;
err = sc_seco_chip_info(-1, &lc, NULL, NULL, NULL);
--
2.25.1
next reply other threads:[~2020-12-21 17:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 17:31 Clément Péron [this message]
2020-12-22 1:55 ` [PATCH v2] imx: ahab: allow to bypass confirmation for ahab_close cmd Peng Fan
2020-12-23 13:18 ` Oliver Graute
2020-12-26 15:53 ` sbabic at denx.de
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221173128.354567-1-peron.clem@gmail.com \
--to=peron.clem@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.