lib, zebra: Fix CR comments

lib -> Add a bit of documentation about what units we are in.
zebra -> Fix failure case to be a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-04-03 18:28:26 -04:00
parent 6f4c7f7476
commit eb649b7ff3
2 changed files with 5 additions and 3 deletions

View File

@ -229,7 +229,7 @@ struct interface
/* Interface metric */
uint32_t metric;
/* Interface Speed */
/* Interface Speed in Mb/s */
uint32_t speed;
/* Interface MTU. */

View File

@ -330,8 +330,10 @@ get_iflink_speed (const char *ifname)
/* Get the current link state for the interface */
rc = ioctl(sd, SIOCETHTOOL, (char *)&ifdata);
if(rc < 0) {
zlog_debug ("IOCTL failure to read interface %s speed: %d %s",
ifname, errno, safe_strerror(errno));
zlog_debug("IOCTL failure to read interface %s speed: %d %s",
ifname, errno, safe_strerror(errno));
ecmd.speed_hi = 0;
ecmd.speed = 0;
}
close(sd);