X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincctl.c;fp=src%2Ftincctl.c;h=5d37fda4463158986568461ec9be5edcd79b93c1;hp=c6d75824498827229866a2fa10e9daa930acd080;hb=2e318f379992a730f592b4c5261d26d8e1a38cfd;hpb=00398a60ec317740bcec83c5a524c5a95ce7f1c2 diff --git a/src/tincctl.c b/src/tincctl.c index c6d75824..5d37fda4 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -308,8 +308,7 @@ static FILE *ask_and_open(const char *filename, const char *what, const char *mo /* Check stdin and stdout */ if(ask && tty) { /* Ask for a file and/or directory name. */ - fprintf(stdout, "Please enter a file to save %s to [%s]: ", what, filename); - fflush(stdout); + fprintf(stderr, "Please enter a file to save %s to [%s]: ", what, filename); if(fgets(buf, sizeof buf, stdin) == NULL) { fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno)); @@ -1711,8 +1710,7 @@ static int cmd_init(int argc, char *argv[]) { } else if(argc < 2) { if(tty) { char buf[1024]; - fprintf(stdout, "Enter the Name you want your tinc node to have: "); - fflush(stdout); + fprintf(stderr, "Enter the Name you want your tinc node to have: "); if(!fgets(buf, sizeof buf, stdin)) { fprintf(stderr, "Error while reading stdin: %s\n", strerror(errno)); return 1;