From 6203f3ae61e85456436fe7713674fdac5f28c802 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 8 Mar 2026 00:56:56 +0000 Subject: util/nvmutil: print mac before setting this way, if a user does e.g. ./nvm gbe.bin bullshit It will say: bullshit Right now, it just says invalid length. This means if the user wanted to type e.g. ./nvm gbe.bin copy 0 but they typed: ./nvm gbe.bin coyp 0 Now it will tell them that it's trying to set the MAC address "coyp". This is because if an invalid command is given, it's treated as a MAC address instead. This is by design, to allow e.g. ./nvm gbe.bin xx:1x:1x:xx:xx:xx Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index eee46e73..3b118e6c 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -462,8 +462,8 @@ cmd_setmac(void) size_t partnum; uint8_t mac_updated = 0; - parse_mac_string(); printf("MAC address to be written: %s\n", mac_str); + parse_mac_string(); for (partnum = 0; partnum < 2; partnum++) mac_updated |= write_mac_part(partnum); -- cgit v1.2.1