Browse Source

auc: accept both 'y' and 'Y' as confirmation from user

Accept both 'y' and 'Y' as positive confirmation when asking the user
if auc should proceed with requesting and installing an upgrade.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
lilik-openwrt-22.03
Daniel Golle 3 years ago
parent
commit
d27ecdcc49
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      utils/auc/src/auc.c

+ 4
- 1
utils/auc/src/auc.c View File

@ -920,9 +920,12 @@ static int init_ustream_ssl(void) {
static int ask_user(void)
{
char user_input;
fprintf(stderr, "Are you sure you want to continue the upgrade process? [N/y] ");
if (getchar() != 'y')
user_input = getchar();
if ((user_input != 'y') && (user_input != 'Y'))
return -EINTR;
return 0;
}


Loading…
Cancel
Save