[PATCH 03/11] Reference MAC as HW address

Daniel M. Weeks weeksd2 at rpi.edu
Fri Apr 17 03:58:59 AEST 2020


Change references in logs and menus from "MAC address" to "hwaddr" or
"HW Address" to reduce confusion for non-MAC interfaces.

Signed-off-by: Daniel M. Weeks <weeksd2 at rpi.edu>
---
 discover/network.c      | 6 +++---
 ui/ncurses/nc-sysinfo.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/discover/network.c b/discover/network.c
index 338762b..68400a5 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -620,7 +620,7 @@ static int network_handle_nlmsg(struct network *network, struct nlmsghdr *nlmsg)
 		list_for_each_entry(&network->interfaces, tmp, list)
 			if (hwaddr_cmp(interface->hwaddr, interface->hwaddr_len,
 						tmp->hwaddr, tmp->hwaddr_len) == 0) {
-				pb_log("%s: %s has duplicate MAC address, ignoring\n",
+				pb_log("%s: %s has duplicate hwaddr, ignoring\n",
 				       __func__, interface->name);
 				talloc_free(interface);
 				return -1;
@@ -693,7 +693,7 @@ void network_mark_interface_ready(struct device_handler *handler,
 		list_for_each_entry(&network->interfaces, tmp, list)
 			if (hwaddr_cmp(interface->hwaddr, interface->hwaddr_len,
 					tmp->hwaddr, tmp->hwaddr_len) == 0) {
-				pb_log("%s: %s has duplicate MAC address, ignoring\n",
+				pb_log("%s: %s has duplicate hwaddr, ignoring\n",
 				       __func__, interface->name);
 				talloc_free(interface);
 				return;
@@ -718,7 +718,7 @@ void network_mark_interface_ready(struct device_handler *handler,
 
 	if (hwaddr_cmp(interface->hwaddr, interface->hwaddr_len, mac, hwsize) != 0) {
 		macstr = mac_bytes_to_string(interface, mac, hwsize);
-		pb_log("Warning - new MAC for interface %d does not match: %s\n",
+		pb_log("Warning - new hwaddr for interface %d does not match: %s\n",
 				ifindex, macstr);
 		talloc_free(macstr);
 	}
diff --git a/ui/ncurses/nc-sysinfo.c b/ui/ncurses/nc-sysinfo.c
index ef5d237..16faec9 100644
--- a/ui/ncurses/nc-sysinfo.c
+++ b/ui/ncurses/nc-sysinfo.c
@@ -129,7 +129,7 @@ static void sysinfo_screen_populate(struct sysinfo_screen *screen,
 		if_info_mac_str(info, macbuf, sizeof(macbuf));
 
 		line("%s:", info->name);
-		line(_(" MAC:        %s"), macbuf);
+		line(_(" HW Address: %s"), macbuf);
 		line(_(" IP Address: %s"), info->address ?: _("none"));
 		/* TRANSLATORS: these "up" / "down" strings refer to the
 		 * link status for a network connection. */
-- 
Daniel M. Weeks


-- 
Daniel M. Weeks
Lead HPC Developer
Center for Computational Innovations
Rensselaer Polytechnic Institute
Troy, NY 12180
518-276-4458


More information about the Petitboot mailing list