X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincctl.c;h=c3fa2fa75a1ffeb3362f5c81c498c46ab21dd6ac;hb=06a4a8c153407b690a3ce3f0e7fdaa8568ccb1a3;hp=c6d75824498827229866a2fa10e9daa930acd080;hpb=38adc8bf548c2c465d5f4147866c3d3f9112d3a8;p=tinc diff --git a/src/tincctl.c b/src/tincctl.c index c6d75824..c3fa2fa7 100644 --- a/src/tincctl.c +++ b/src/tincctl.c @@ -1,6 +1,6 @@ /* tincctl.c -- Controlling a running tincd - Copyright (C) 2007-2013 Guus Sliepen + Copyright (C) 2007-2014 Guus Sliepen This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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;