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
db5879c6b5
commit
da0a6c216c
|
@ -249,6 +249,8 @@ cmd_setmac(void)
|
||||||
int mac_updated = 0;
|
int mac_updated = 0;
|
||||||
parseMacString(strMac, mac);
|
parseMacString(strMac, mac);
|
||||||
|
|
||||||
|
printf("MAC address to be written: %s\n", strMac);
|
||||||
|
|
||||||
for (int partnum = 0; partnum < 2; partnum++) {
|
for (int partnum = 0; partnum < 2; partnum++) {
|
||||||
if (!goodChecksum(part = partnum))
|
if (!goodChecksum(part = partnum))
|
||||||
continue;
|
continue;
|
||||||
|
@ -257,6 +259,9 @@ cmd_setmac(void)
|
||||||
for (int w = 0; w < 3; w++) /* write MAC to gbe part */
|
for (int w = 0; w < 3; w++) /* write MAC to gbe part */
|
||||||
setWord(w, partnum, mac[w]);
|
setWord(w, partnum, mac[w]);
|
||||||
|
|
||||||
|
printf("Wrote MAC address to part %d: ", partnum);
|
||||||
|
macf(partnum);
|
||||||
|
|
||||||
cmd_setchecksum(); /* MAC updated; need valid checksum */
|
cmd_setchecksum(); /* MAC updated; need valid checksum */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue