version 1.31, 2009/03/18 15:14:30 |
version 1.32, 2009/03/18 16:00:15 |
|
|
bcopy ((void *)bootregs[11], rpb, sizeof(struct rpb)); |
bcopy ((void *)bootregs[11], rpb, sizeof(struct rpb)); |
bcopy ((void*)rpb->iovec, bqo, rpb->iovecsz); |
bcopy ((void*)rpb->iovec, bqo, rpb->iovecsz); |
} else { |
} else { |
bzero(rpb, sizeof(struct rpb)); |
memset(rpb, 0, sizeof(struct rpb)); |
rpb->devtyp = bootregs[0]; |
rpb->devtyp = bootregs[0]; |
rpb->unit = bootregs[3]; |
rpb->unit = bootregs[3]; |
rpb->rpb_bootr5 = bootregs[5]; |
rpb->rpb_bootr5 = bootregs[5]; |
Line 206 tar_open(char *path, struct open_file *f |
|
Line 206 tar_open(char *path, struct open_file *f |
|
{ |
{ |
char *buf = alloc(512); |
char *buf = alloc(512); |
|
|
bzero(buf, 512); |
memset(buf, 0, 512); |
romstrategy(0, 0, 8192, 512, buf, 0); |
romstrategy(0, 0, 8192, 512, buf, 0); |
if (memcmp(buf, "boot", 5) || memcmp(&buf[257], "ustar", 5)) |
if (memcmp(buf, "boot", 5) || memcmp(&buf[257], "ustar", 5)) |
return EINVAL; /* Not a ustarfs with "boot" first */ |
return EINVAL; /* Not a ustarfs with "boot" first */ |