summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2006-03-25 13:35:44 +0000
committerMatt Johnston <matt@ucc.asn.au>2006-03-25 13:35:44 +0000
commitf157032a66a911f71d75f01c2e4cd7d363e89eff (patch)
tree0497990095b16bf2512b0dd7edb61056b3ab413f
parent09cb9cdb96b0a9bb2b0fe3df807c72d063a6f2e0 (diff)
downloaddropbear-f157032a66a911f71d75f01c2e4cd7d363e89eff.tar.gz
printf not fprintf for scp stuff
-rw-r--r--scp.c16
-rw-r--r--scpmisc.c6
2 files changed, 11 insertions, 11 deletions
diff --git a/scp.c b/scp.c
index 95c6662..2351fdb 100644
--- a/scp.c
+++ b/scp.c
@@ -125,10 +125,10 @@ do_local_cmd(arglist *a)
fatal("do_local_cmd: no arguments");
if (verbose_mode) {
- fprintf(stderr, "Executing:");
+ printf( "Executing:");
for (i = 0; i < a->num; i++)
- fprintf(stderr, " %s", a->list[i]);
- fprintf(stderr, "\n");
+ printf( " %s", a->list[i]);
+ printf( "\n");
}
if ((pid = fork()) == -1)
fatal("do_local_cmd: fork: %s", strerror(errno));
@@ -858,7 +858,7 @@ sink(int argc, char **argv)
} while (cp < &buf[sizeof(buf) - 1] && ch != '\n');
*cp = 0;
if (verbose_mode)
- fprintf(stderr, "Sink: %s", buf);
+ printf( "Sink: %s", buf);
if (buf[0] == '\01' || buf[0] == '\02') {
if (iamremote == 0)
@@ -1146,12 +1146,12 @@ run_err(const char *fmt,...)
++errs;
if (fp == NULL && !(fp = fdopen(remout, "w")))
return;
- (void) fprintf(fp, "%c", 0x01);
- (void) fprintf(fp, "scp: ");
+ (void) printf( "%c", 0x01);
+ (void) printf( "scp: ");
va_start(ap, fmt);
- (void) vfprintf(fp, fmt, ap);
+ (void) vprintf( fmt, ap);
va_end(ap);
- (void) fprintf(fp, "\n");
+ (void) printf( "\n");
(void) fflush(fp);
if (!iamremote) {
diff --git a/scpmisc.c b/scpmisc.c
index 1ffbcac..b935e30 100644
--- a/scpmisc.c
+++ b/scpmisc.c
@@ -220,7 +220,7 @@ void fatal(char* fmt,...)
{
va_list args;
va_start(args, fmt);
- vfprintf(stderr, fmt, args);
+ vprintf( fmt, args);
va_end(args);
exit(255);
}
@@ -231,7 +231,7 @@ sanitise_stdfd(void)
int nullfd, dupfd;
if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
- fprintf(stderr, "Couldn't open /dev/null: %s", strerror(errno));
+ printf( "Couldn't open /dev/null: %s", strerror(errno));
exit(1);
}
while (++dupfd <= 2) {
@@ -239,7 +239,7 @@ sanitise_stdfd(void)
if (fcntl(dupfd, F_GETFL, 0) >= 0)
continue;
if (dup2(nullfd, dupfd) == -1) {
- fprintf(stderr, "dup2: %s", strerror(errno));
+ printf( "dup2: %s", strerror(errno));
exit(1);
}
}