summaryrefslogtreecommitdiff
path: root/common/cmd_otp.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-05-23 08:13:59 -0400
committerTom Rini <trini@ti.com>2014-05-23 08:13:59 -0400
commit638b3e8342e4b395f9e961bfac200420f29874a3 (patch)
tree01bcc5cc7aff24e9a3001add54f321529e5b1cc8 /common/cmd_otp.c
parent4d16f67e7ba1a69929b55852f1a274c457a0db27 (diff)
parentdf348d8245922adbb03a3a979429c5e70342973c (diff)
Merge branch 'master' of git://git.denx.de/u-boot-mmc
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 67808aa377..593bb8c650 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;
}
}