projects
/
feed
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66b7c19
)
auc: accept both 'y' and 'Y' as confirmation from user
author
Daniel Golle
<daniel@makrotopia.org>
Wed, 9 Feb 2022 17:41:49 +0000
(17:41 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Sun, 13 Feb 2022 22:30:42 +0000
(22:30 +0000)
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>
utils/auc/src/auc.c
patch
|
blob
|
history
diff --git
a/utils/auc/src/auc.c
b/utils/auc/src/auc.c
index e993a93916d14b8b00ccbf7facbd4ea5cef5b1f2..6a78d2db825c1519c8faf34c1a7415a3f003b7d5 100644
(file)
--- a/
utils/auc/src/auc.c
+++ b/
utils/auc/src/auc.c
@@
-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;
}