From da0a6c216cf7de6442fdba8ce1b4801e0c19d9bb Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 27 Jan 2025 05:36:25 +0000 Subject: [PATCH] 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 --- util/nvmutil/nvmutil.c | 5 +++++ 1 file changed, 5 insertions(+) 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 */ }