aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-04-07 15:08:12 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-04-07 15:08:12 +0200
commit77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c (patch)
treed00b5b460baa99be5547a2236790dbea31f90a5d /libbb
parent2f094ae82106e91cb210e79ddc2e5285377b549e (diff)
downloadbusybox-77cb6b99a436c20bb171e6cdad7b8b8b5ce3692c.tar.gz
libbb: rename bb_ask -> bb_ask_noecho, bb_ask_confirmation -> bb_ask_y_confirmation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/ask_confirmation.c4
-rw-r--r--libbb/bb_askpass.c6
-rw-r--r--libbb/copy_file.c2
-rw-r--r--libbb/correct_password.c2
-rw-r--r--libbb/remove_file.c6
5 files changed, 10 insertions, 10 deletions
diff --git a/libbb/ask_confirmation.c b/libbb/ask_confirmation.c
index 6fbed89f4..ccd983c29 100644
--- a/libbb/ask_confirmation.c
+++ b/libbb/ask_confirmation.c
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * bb_ask_confirmation implementation for busybox
+ * bb_ask_y_confirmation implementation for busybox
*
* Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
*
@@ -11,7 +11,7 @@
/* Read a line from stdin. If the first non-whitespace char is 'y' or 'Y',
* return 1. Otherwise return 0.
*/
-int FAST_FUNC bb_ask_confirmation(void)
+int FAST_FUNC bb_ask_y_confirmation(void)
{
char first = 0;
int c;
diff --git a/libbb/bb_askpass.c b/libbb/bb_askpass.c
index 5599c82ef..aadc69108 100644
--- a/libbb/bb_askpass.c
+++ b/libbb/bb_askpass.c
@@ -13,11 +13,11 @@ static void askpass_timeout(int UNUSED_PARAM ignore)
{
}
-char* FAST_FUNC bb_ask_stdin(const char *prompt)
+char* FAST_FUNC bb_ask_noecho_stdin(const char *prompt)
{
- return bb_ask(STDIN_FILENO, 0, prompt);
+ return bb_ask_noecho(STDIN_FILENO, 0, prompt);
}
-char* FAST_FUNC bb_ask(const int fd, int timeout, const char *prompt)
+char* FAST_FUNC bb_ask_noecho(const int fd, int timeout, const char *prompt)
{
/* Was static char[BIGNUM] */
enum { sizeof_passwd = 128 };
diff --git a/libbb/copy_file.c b/libbb/copy_file.c
index be9006631..1b8befd65 100644
--- a/libbb/copy_file.c
+++ b/libbb/copy_file.c
@@ -48,7 +48,7 @@ static int ask_and_unlink(const char *dest, int flags)
// (No "opening without O_EXCL", no "unlink only if -f")
// Or else we will end up having 3 open()s!
fprintf(stderr, "%s: overwrite '%s'? ", applet_name, dest);
- if (!bb_ask_confirmation())
+ if (!bb_ask_y_confirmation())
return 0; /* not allowed to overwrite */
}
if (unlink(dest) < 0) {
diff --git a/libbb/correct_password.c b/libbb/correct_password.c
index a6f7d9b3d..cbe6cb387 100644
--- a/libbb/correct_password.c
+++ b/libbb/correct_password.c
@@ -106,7 +106,7 @@ int FAST_FUNC ask_and_check_password_extended(const struct passwd *pw,
if (!pw_pass[0]) /* empty password field? */
return CHECKPASS_PW_HAS_EMPTY_PASSWORD;
- plaintext = bb_ask(STDIN_FILENO, timeout, prompt);
+ plaintext = bb_ask_noecho(STDIN_FILENO, timeout, prompt);
if (!plaintext) {
/* EOF (such as ^D) or error (such as ^C) or timeout */
return -1;
diff --git a/libbb/remove_file.c b/libbb/remove_file.c
index 8a1324393..074ffae70 100644
--- a/libbb/remove_file.c
+++ b/libbb/remove_file.c
@@ -41,7 +41,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
) {
fprintf(stderr, "%s: descend into directory '%s'? ", applet_name,
path);
- if (!bb_ask_confirmation())
+ if (!bb_ask_y_confirmation())
return 0;
}
@@ -68,7 +68,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
if (flags & FILEUTILS_INTERACTIVE) {
fprintf(stderr, "%s: remove directory '%s'? ", applet_name, path);
- if (!bb_ask_confirmation())
+ if (!bb_ask_y_confirmation())
return status;
}
@@ -92,7 +92,7 @@ int FAST_FUNC remove_file(const char *path, int flags)
|| (flags & FILEUTILS_INTERACTIVE)
) {
fprintf(stderr, "%s: remove '%s'? ", applet_name, path);
- if (!bb_ask_confirmation())
+ if (!bb_ask_y_confirmation())
return 0;
}