libnm-core, etc: drop type-based hwaddr funcs, port to length-based ones

Drop the arptype-based nm_utils_hwaddr funcs, and rename the
length-based ones to no longer have _len in their names. This also
switches nm_utils_hwaddr_atoba() to using a length rather than an
arptype, and adds a length argument to nm_utils_hwaddr_valid() (making
nm_utils_hwaddr_valid() now a replacement for nm_utils_hwaddr_aton()
in some places, where we were only using aton() to do validity
checking).
This commit is contained in:
Dan Winship
2014-07-04 15:59:19 -04:00
parent 86ab915f6a
commit 35f36ba4c3
32 changed files with 140 additions and 182 deletions

View File

@@ -2516,7 +2516,7 @@ link_set_address (NMPlatform *platform, int ifindex, gconstpointer address, size
rtnl_link_set_addr (change, nladdr);
if (nm_logging_enabled (LOGL_DEBUG, LOGD_PLATFORM)) {
char *mac = nm_utils_hwaddr_ntoa_len (address, length);
char *mac = nm_utils_hwaddr_ntoa (address, length);
debug ("link: change %d: address %s (%lu bytes)", ifindex, mac, (unsigned long) length);
g_free (mac);