dnprogs package: Send libdnet/dnet_htoa errors messages to stderr rather than stdout
Hi,
I suggest to apply this patch in dnprogs package:
http://linux-decnet.cvs.sourceforge.net/viewvc/linux-decnet/dnprogs/libdnet/dnet_htoa.c?view=patch&r1=1.2&r2=1.3&sortby=date
(Found using the libdnet library with the tcpdump tool, I see that the errors messages of dnet_htoa
function goes in stdout rather than stderr (example: missing /etc/decnet.conf).
Greetings,
Francois-Xavier Le Bail
--- dnet_htoa.c 2000/12/06 19:55:28 1.2
+++ dnet_htoa.c 2015/01/19 08:31:45 1.3
@@ -37,7 +37,7 @@
if ((dnhosts = fopen(SYSCONF_PREFIX "/etc/decnet.conf","r")) == NULL)
{
- printf("dnet_htoa: Can not open " SYSCONF_PREFIX "/etc/decnet.conf\n");
+ fprintf(stderr, "dnet_htoa: Can not open " SYSCONF_PREFIX "/etc/decnet.conf\n");
return 0;
}
while (fgets(nodeln,80,dnhosts) != NULL)
@@ -49,7 +49,7 @@
(strcmp(nodetag,"node") != 0)) ||
(strcmp(nametag,"name") != 0))
{
- printf("dnet_htoa: Invalid decnet.conf syntax\n");
+ fprintf(stderr, "dnet_htoa: Invalid decnet.conf syntax\n");
fclose(dnhosts);
return 0;
}
Reply to: