netdev-linux: Translate errno value to name in log message.
authorBen Pfaff <blp@nicira.com>
Tue, 6 Dec 2011 22:22:00 +0000 (14:22 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 19 Dec 2011 22:53:24 +0000 (14:53 -0800)
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/netdev-linux.c

index a100898a5d2c3fe695852822658d23a25422aee6..9ff286ee4fe75b0031c2f24dae02a66622dbb0f9 100644 (file)
@@ -1244,8 +1244,8 @@ get_stats_via_vport(const struct netdev *netdev_,
 
         error = netdev_vport_get_stats(netdev_, stats);
         if (error) {
-            VLOG_WARN_RL(&rl, "%s: obtaining netdev stats via vport failed %d",
-                         netdev_get_name(netdev_), error);
+            VLOG_WARN_RL(&rl, "%s: obtaining netdev stats via vport failed "
+                         "(%s)", netdev_get_name(netdev_), strerror(error));
         }
         netdev_dev->have_vport_stats = !error;
         netdev_dev->cache_valid |= VALID_HAVE_VPORT_STATS;