From 17058a06c4333fc0c492c168c8a971ebd0fd5a5a Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sat, 7 Apr 2018 15:50:30 +0200 Subject: libbb: switch bb_ask_noecho() to "mallocing" string return API function old new delta bb_ask_noecho 313 330 +17 get_cred_or_die 125 115 -10 passwd_main 995 958 -37 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 17/-47) Total: -30 bytes Signed-off-by: Denys Vlasenko --- include/libbb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 5388d9d..ed9a562 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1408,10 +1408,11 @@ extern int set_loop(char **devname, const char *file, unsigned long long offset, #define BB_LO_FLAGS_READ_ONLY 1 #define BB_LO_FLAGS_AUTOCLEAR 4 -/* Like bb_ask_noecho below, but asks on stdin with no timeout. */ +/* Returns malloced str */ +char *bb_ask_noecho(int fd, int timeout, const char *prompt) FAST_FUNC; +/* Like bb_ask_noecho, but asks on stdin with no timeout. */ char *bb_ask_noecho_stdin(const char *prompt) FAST_FUNC; -//TODO: pass buf pointer or return allocated buf (avoid statics)? -char *bb_ask_noecho(const int fd, int timeout, const char *prompt) FAST_FUNC; + int bb_ask_y_confirmation_FILE(FILE *fp) FAST_FUNC; int bb_ask_y_confirmation(void) FAST_FUNC; -- cgit v1.1