summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
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 6fbed89..ccd983c 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 5599c82..aadc691 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 be90066..1b8befd 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 a6f7d9b..cbe6cb3 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 8a13243..074ffae 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;
}