util/nvmutil: use bsd-style indentation
the style was already quite similar, but extended lines in bsd are indented by 4 spaces instead of a tab. this style has grown on me, so i'm adopting it here Signed-off-by: Leah Rowe <leah@libreboot.org>fsdg20230625
parent
18f39ab6fa
commit
9aa34f1e20
|
@ -40,9 +40,10 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
err_if((errno = ((strMac == NULL) && (cmd == NULL)) ? EINVAL : errno));
|
err_if((errno = ((strMac == NULL) && (cmd == NULL)) ? EINVAL : errno));
|
||||||
|
|
||||||
skipread[part ^ 1] = (cmd == &cmd_copy) |
|
skipread[part ^ 1] = (cmd == &cmd_copy) | (cmd == &cmd_setchecksum)
|
||||||
(cmd == &cmd_setchecksum) | (cmd == &cmd_brick);
|
| (cmd == &cmd_brick);
|
||||||
readGbeFile(FILENAME, flags);
|
readGbeFile(FILENAME, flags);
|
||||||
|
|
||||||
(void)rhex();
|
(void)rhex();
|
||||||
xunveil("/dev/urandom", "r");
|
xunveil("/dev/urandom", "r");
|
||||||
if (flags == O_RDONLY) {
|
if (flags == O_RDONLY) {
|
||||||
|
@ -114,7 +115,7 @@ invalidMacAddress(const char *strMac, uint16_t *mac)
|
||||||
if (strMac[i + nib] == '?')
|
if (strMac[i + nib] == '?')
|
||||||
h = (h & 0xE) | 2; /* local, unicast */
|
h = (h & 0xE) | 2; /* local, unicast */
|
||||||
mac[byte >> 1] |= ((uint16_t ) h)
|
mac[byte >> 1] |= ((uint16_t ) h)
|
||||||
<< ((8 * (byte % 2)) + (4 * (nib ^ 1)));
|
<< ((8 * (byte % 2)) + (4 * (nib ^ 1)));
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
return ((total == 0) | (mac[0] & 1)); /* multicast/all-zero banned */
|
return ((total == 0) | (mac[0] & 1)); /* multicast/all-zero banned */
|
||||||
|
@ -206,7 +207,7 @@ cmd_swap(void)
|
||||||
{
|
{
|
||||||
xorswap(gbe[0], gbe[1]); /* speedhack: swap ptr, not words */
|
xorswap(gbe[0], gbe[1]); /* speedhack: swap ptr, not words */
|
||||||
gbeFileModified = nvmPartModified[0] = nvmPartModified[1]
|
gbeFileModified = nvmPartModified[0] = nvmPartModified[1]
|
||||||
= validChecksum(1) | validChecksum(0);
|
= validChecksum(1) | validChecksum(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue