From patchwork Thu Apr 16 17:58:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Daniel M. Weeks" X-Patchwork-Id: 1271840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4936VP4DZhz9sWW for ; Fri, 17 Apr 2020 04:01:33 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=rpi.edu Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4936VN6qQ0zDrg6 for ; Fri, 17 Apr 2020 04:01:32 +1000 (AEST) X-Original-To: petitboot@lists.ozlabs.org Delivered-To: petitboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=rpi.edu (client-ip=128.113.2.230; helo=smtp10.server.rpi.edu; envelope-from=weeksd2@rpi.edu; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=rpi.edu Received: from smtp10.server.rpi.edu (smtp10.server.rpi.edu [128.113.2.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4936RZ53nYzDsG2 for ; Fri, 17 Apr 2020 03:59:04 +1000 (AEST) Received: from smtp-auth3.server.rpi.edu (smtp-auth3.server.rpi.edu [128.113.2.233]) by smtp10.server.rpi.edu (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 03GHx0kS096830 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Apr 2020 13:59:01 -0400 Received: from smtp-auth3.server.rpi.edu (localhost [127.0.0.1]) by smtp-auth3.server.rpi.edu (Postfix) with ESMTP id D5F38580E3 for ; Thu, 16 Apr 2020 13:59:00 -0400 (EDT) Received: from dev.danweeks.net (cpe-74-70-107-6.nycap.res.rr.com [74.70.107.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: weeksd2) by smtp-auth3.server.rpi.edu (Postfix) with ESMTPSA id B72B7580E1 for ; Thu, 16 Apr 2020 13:59:00 -0400 (EDT) Date: Thu, 16 Apr 2020 13:58:59 -0400 From: "Daniel M. Weeks" To: petitboot@lists.ozlabs.org Subject: [PATCH 03/11] Reference MAC as HW address Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Virus-Scanned: ClamAV using ClamSMTP X-Bayes-Prob: 0.0001 (Score 0, tokens from: outgoing, @@RPTN) X-Spam-Score: 0.00 () [Hold at 10.10] X-CanIt-Incident-Id: 032rtX1J2 X-CanIt-Geo: ip=74.70.107.6; country=US; region=New York; city=Troy; latitude=42.7273; longitude=-73.6696; http://maps.google.com/maps?q=42.7273,-73.6696&z=6 X-CanItPRO-Stream: outgoing X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.230 X-BeenThere: petitboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Petitboot bootloader development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: petitboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Petitboot" 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 --- 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. */