MFi386: r275059, r275061, r275062 and r275191 (by rdivacky)
Shrink boot2 by a couple more bytes.
This commit is contained in:
parent
d3bf63ef6b
commit
e9f219c6ad
@ -462,7 +462,8 @@ load(void)
|
||||
caddr_t p;
|
||||
ufs_ino_t ino;
|
||||
uint32_t addr;
|
||||
int i, j;
|
||||
int k;
|
||||
uint8_t i, j;
|
||||
|
||||
if (!(ino = lookup(kname))) {
|
||||
if (!ls)
|
||||
@ -483,7 +484,7 @@ load(void)
|
||||
return;
|
||||
} else if (IS_ELF(hdr.eh)) {
|
||||
fs_off = hdr.eh.e_phoff;
|
||||
for (j = i = 0; i < hdr.eh.e_phnum && j < 2; i++) {
|
||||
for (j = k = 0; k < hdr.eh.e_phnum && j < 2; k++) {
|
||||
if (xfsread(ino, ep + j, sizeof(ep[0])))
|
||||
return;
|
||||
if (ep[j].p_type == PT_LOAD)
|
||||
@ -533,6 +534,7 @@ parse()
|
||||
const char *cp;
|
||||
unsigned int drv;
|
||||
int c, i, j;
|
||||
size_t k;
|
||||
|
||||
while ((c = *arg++)) {
|
||||
if (c == ' ' || c == '\t' || c == '\n')
|
||||
@ -555,7 +557,7 @@ parse()
|
||||
#if SERIAL
|
||||
} else if (c == 'S') {
|
||||
j = 0;
|
||||
while ((unsigned int)(i = *arg++ - '0') <= 9)
|
||||
while ((i = *arg++ - '0') <= 9)
|
||||
j = j * 10 + i;
|
||||
if (j > 0 && i == -'0') {
|
||||
comspeed = j;
|
||||
@ -618,10 +620,10 @@ parse()
|
||||
dsk.daua = dsk.disk | dsk.unit;
|
||||
dsk_meta = 0;
|
||||
}
|
||||
if ((i = ep - arg)) {
|
||||
if ((size_t)i >= sizeof(knamebuf))
|
||||
if (k = ep - arg) {
|
||||
if (k >= sizeof(knamebuf))
|
||||
return -1;
|
||||
memcpy(knamebuf, arg, i + 1);
|
||||
memcpy(knamebuf, arg, k + 1);
|
||||
kname = knamebuf;
|
||||
}
|
||||
}
|
||||
@ -754,8 +756,10 @@ drvread(void *buf, unsigned lba)
|
||||
head = x / dsk.sec;
|
||||
sec = x % dsk.sec;
|
||||
|
||||
if (!OPT_CHECK(RBX_QUIET))
|
||||
printf("%c\b", c = c << 8 | c >> 24);
|
||||
if (!OPT_CHECK(RBX_QUIET)) {
|
||||
xputc(c = c << 8 | c >> 24);
|
||||
xputc('\b');
|
||||
}
|
||||
v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
|
||||
v86.addr = READORG; /* call to read in boot1 */
|
||||
v86.ecx = cyl;
|
||||
|
Loading…
Reference in New Issue
Block a user