diff options
author | Leah Rowe <leah@libreboot.org> | 2025-01-27 05:36:25 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-01-27 05:37:02 +0000 |
commit | da0a6c216cf7de6442fdba8ce1b4801e0c19d9bb (patch) | |
tree | 3d7193acb34beec49126ff49cf8764773569ff66 | |
parent | db5879c6b5a25290c08d38f7c9bf56c8461255c1 (diff) |
util/nvmutil: verbosely print the written MAC
This is for user friendliness. Otherwise, many users
might try to dump afterward if they specified a random
MAC address.
This saves the user from having to re-run with the dump
command, thus saving time for the user.
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 2821e71a..70571bee 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -249,6 +249,8 @@ cmd_setmac(void) int mac_updated = 0; parseMacString(strMac, mac); + printf("MAC address to be written: %s\n", strMac); + for (int partnum = 0; partnum < 2; partnum++) { if (!goodChecksum(part = partnum)) continue; @@ -257,6 +259,9 @@ cmd_setmac(void) for (int w = 0; w < 3; w++) /* write MAC to gbe part */ setWord(w, partnum, mac[w]); + printf("Wrote MAC address to part %d: ", partnum); + macf(partnum); + cmd_setchecksum(); /* MAC updated; need valid checksum */ } |