summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-08 00:56:56 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-08 01:11:52 +0000
commit6203f3ae61e85456436fe7713674fdac5f28c802 (patch)
tree3378130cd4403cc9740f5a1ab12e219df4533377 /util
parent698d39dd066b88c393fa00e0338d3f69f4a91633 (diff)
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 <leah@libreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
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);