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>master
parent
bbdd985bea
commit
5540713d16
|
@ -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 */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue