netcat-openbsd/verbose-message-to-stderr.patch

18 lines
690 B
Diff

Index: netcat-openbsd-1.89/netcat.c
===================================================================
--- netcat-openbsd-1.89.orig/netcat.c 2010-02-09 10:29:21.000000000 +0100
+++ netcat-openbsd-1.89/netcat.c 2010-02-09 10:29:45.000000000 +0100
@@ -421,9 +421,9 @@ main(int argc, char *argv[])
uflag ? "udp" : "tcp");
}
- printf("Connection to %s %s port [%s/%s] succeeded!\n",
- host, portlist[i], uflag ? "udp" : "tcp",
- sv ? sv->s_name : "*");
+ fprintf(stderr, "Connection to %s %s port [%s/%s] "
+ "succeeded!\n", host, portlist[i],
+ uflag ? "udp" : "tcp", sv ? sv->s_name : "*");
}
if (!zflag)
readwrite(s);