diff options
author | 2019-05-12 21:30:48 +0000 | |
---|---|---|
committer | 2019-05-12 21:30:48 +0000 | |
commit | 23c91801054daad589640dcc481c494cd7164cf3 (patch) | |
tree | 9ed150209af7c1b145bff20f10aba014313966ba | |
parent | s/availible/available/ (diff) | |
download | wireguard-openbsd-23c91801054daad589640dcc481c494cd7164cf3.tar.xz wireguard-openbsd-23c91801054daad589640dcc481c494cd7164cf3.zip |
Repair ftp -o - and thus pkg_add: print informational messages on stderr
ok florian@ espie@
-rw-r--r-- | usr.bin/ftp/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index b17afb6de09..e5203aecd00 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.122 2019/05/12 20:58:19 jasper Exp $ */ +/* $OpenBSD: main.c,v 1.123 2019/05/12 21:30:48 jca Exp $ */ /* * Copyright (c) 2015 Sunil Nimmagadda <sunil@openbsd.org> @@ -303,6 +303,8 @@ child(int sock, int argc, char **argv) imsg_init(&child_ibuf, sock); tostdout = oarg && (strcmp(oarg, "-") == 0); + if (tostdout) + msgout = stderr; if (resume && tostdout) errx(1, "can't append to stdout"); @@ -330,7 +332,6 @@ child(int sock, int argc, char **argv) if (tostdout) { dst_fp = stdout; - msgout = stderr; } else if ((dst_fp = fdopen(fd, "w")) == NULL) err(1, "%s: fdopen", __func__); |