From: Andre Noll Date: Wed, 25 Mar 2020 12:50:25 +0000 (+0100) Subject: attach_to_bridge(): Improve error message. X-Git-Tag: v1.0.0~16 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=241eb766daa57d8ab200d20c35c2a490e0734691;p=micoforia.git attach_to_bridge(): Improve error message. if_nametoindex() sets errno on errors, so let's print the error string using %m. --- diff --git a/util.c b/util.c index ebe5b1e..08f4832 100644 --- a/util.c +++ b/util.c @@ -526,7 +526,7 @@ bool attach_to_bridge(const char *iface, const char *bridge) INFO_LOG("adding interface %s to bridge %s\n", iface, bridge); if (!(idx = if_nametoindex(iface))) { - ERROR_LOG("no index for %s\n", iface); + ERROR_LOG("no index for %s: %m\n", iface); return false; } if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {