summaryrefslogtreecommitdiff
path: root/common/cmd_otp.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/cmd_otp.c')
-rw-r--r--common/cmd_otp.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/common/cmd_otp.c b/common/cmd_otp.c
index 67808aa377e..593bb8c650c 100644
--- a/common/cmd_otp.c
+++ b/common/cmd_otp.c
@@ -158,21 +158,9 @@ int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
lowup(half + count - 1), page + (half + count - 1) / 2,
half + count
);
-
- i = 0;
- while (1) {
- if (tstc()) {
- const char exp_ans[] = "YES\r";
- char c;
- putc(c = getc());
- if (exp_ans[i++] != c) {
- printf(" Aborting\n");
- return 1;
- } else if (!exp_ans[i]) {
- puts("\n");
- break;
- }
- }
+ if (!confirm_yesno()) {
+ printf(" Aborting\n");
+ return 1;
}
}