ipaddress: print error message on stderr

Convention is to print error messages only on stderr.
Helps when scripting.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Stephen Hemminger 2019-03-15 08:30:26 -07:00
parent 546109a7cf
commit f36f8fe535

View File

@ -174,7 +174,9 @@ static void print_queuelen(FILE *f, struct rtattr *tb[IFLA_MAX + 1])
strcpy(ifr.ifr_name, rta_getattr_str(tb[IFLA_IFNAME])); strcpy(ifr.ifr_name, rta_getattr_str(tb[IFLA_IFNAME]));
if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) { if (ioctl(s, SIOCGIFTXQLEN, &ifr) < 0) {
fprintf(f, "ioctl(SIOCGIFTXQLEN) failed: %s\n", strerror(errno)); fprintf(stderr,
"ioctl(SIOCGIFTXQLEN) failed: %s\n",
strerror(errno));
close(s); close(s);
return; return;
} }