Use consistent whitespace.

Reviewed by:	strip --strip-debug -o - gptboot.o | md5
Sponsored by:	iXsystems, Inc.
This commit is contained in:
benno 2018-04-05 19:27:24 +00:00
parent 198d9fcdd8
commit 75db17a2d6

View File

@ -152,7 +152,8 @@ bios_getmem(void)
(smap.length >= (512 * 1024)))
bios_basemem = smap.length;
/* look for the first segment in 'extended' memory */
if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base == 0x100000)) {
if ((smap.type == SMAP_TYPE_MEMORY) &&
(smap.base == 0x100000)) {
bios_extmem = smap.length;
}
@ -160,12 +161,13 @@ bios_getmem(void)
* Look for the largest segment in 'extended' memory beyond
* 1MB but below 4GB.
*/
if ((smap.type == SMAP_TYPE_MEMORY) && (smap.base > 0x100000) &&
(smap.base < 0x100000000ull)) {
if ((smap.type == SMAP_TYPE_MEMORY) &&
(smap.base > 0x100000) && (smap.base < 0x100000000ull)) {
size = smap.length;
/*
* If this segment crosses the 4GB boundary, truncate it.
* If this segment crosses the 4GB boundary,
* truncate it.
*/
if (smap.base + size > 0x100000000ull)
size = 0x100000000ull - smap.base;
@ -186,14 +188,18 @@ bios_getmem(void)
bios_basemem = (v86.eax & 0xffff) * 1024;
}
/* Fall back through several compatibility functions for extended memory */
/*
* Fall back through several compatibility functions for extended
* memory
*/
if (bios_extmem == 0) {
v86.ctl = V86_FLAGS;
v86.addr = 0x15; /* int 0x15 function 0xe801*/
v86.eax = 0xe801;
v86int();
if (!(v86.efl & 1)) {
bios_extmem = ((v86.ecx & 0xffff) + ((v86.edx & 0xffff) * 64)) * 1024;
bios_extmem = ((v86.ecx & 0xffff) +
((v86.edx & 0xffff) * 64)) * 1024;
}
}
if (bios_extmem == 0) {
@ -385,7 +391,8 @@ load(void)
if (!(ino = lookup(kname))) {
if (!ls) {
printf("%s: No %s on %u:%s(%up%u)\n", BOOTPROG,
kname, dsk.drive & DRV_MASK, dev_nm[dsk.type], dsk.unit,
kname, dsk.drive & DRV_MASK, dev_nm[dsk.type],
dsk.unit,
dsk.part);
}
return;
@ -448,7 +455,8 @@ load(void)
if (xfsread(ino, &es, sizeof(es)))
return;
for (i = 0; i < 2; i++) {
memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
memcpy(p, &es[i].sh_size,
sizeof(es[i].sh_size));
p += sizeof(es[i].sh_size);
fs_off = es[i].sh_offset;
if (xfsread(ino, p, es[i].sh_size))
@ -464,7 +472,8 @@ load(void)
#ifdef LOADER_GELI_SUPPORT
geliargs.size = sizeof(geliargs);
explicit_bzero(gelipw, sizeof(gelipw));
gelibuf = malloc(sizeof(struct keybuf) + (GELI_MAX_KEYS * sizeof(struct keybuf_ent)));
gelibuf = malloc(sizeof(struct keybuf) +
(GELI_MAX_KEYS * sizeof(struct keybuf_ent)));
geli_fill_keybuf(gelibuf);
geliargs.notapw = '\0';
geliargs.keybuf_sentinel = KEYBUF_SENTINEL;
@ -502,20 +511,25 @@ parse_cmds(char *cmdstr, int *dskupdated)
if (*(uint8_t *)PTOV(0x496) & 0x10) {
cp = "yes";
} else {
opts |= OPT_SET(RBX_DUAL) | OPT_SET(RBX_SERIAL);
opts |= OPT_SET(RBX_DUAL) |
OPT_SET(RBX_SERIAL);
cp = "no";
}
printf("Keyboard: %s\n", cp);
continue;
} else if (c == 'S') {
j = 0;
while ((unsigned int)(i = *arg++ - '0') <= 9)
while ((unsigned int)(i = *arg++ - '0')
<= 9)
j = j * 10 + i;
if (j > 0 && i == -'0') {
comspeed = j;
break;
}
/* Fall through to error below ('S' not in optstr[]). */
/*
* Fall through to error below
* ('S' not in optstr[]).
*/
}
for (i = 0; c != optstr[i]; i++)
if (i == NOPT - 1)