diff options
author | ps <ps@FreeBSD.org> | 2000-04-21 03:04:16 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2000-04-21 03:04:16 +0000 |
commit | b181e7c26083cf972b1e795646f6f27c9d84b26f (patch) | |
tree | 0fc3cb90f7805fc1348060aed16b572df060f4ae /sys | |
parent | d4eb90b76c935aa53fe506030c850ff8de1aa579 (diff) | |
download | FreeBSD-src-b181e7c26083cf972b1e795646f6f27c9d84b26f.zip FreeBSD-src-b181e7c26083cf972b1e795646f6f27c9d84b26f.tar.gz |
Don't call the PXE cleanup routine if PXE is not enabled. This
should fix the "Invalid partition table" error people were seeing.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/boot/i386/libi386/pxe.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/boot/i386/libi386/pxe.c b/sys/boot/i386/libi386/pxe.c index 9d5ab08..e452bc4 100644 --- a/sys/boot/i386/libi386/pxe.c +++ b/sys/boot/i386/libi386/pxe.c @@ -191,8 +191,10 @@ pxe_init(void) pxe_p = (pxe_t *)PTOV(pxenv_p->PXEPtr.segment * 16 + pxenv_p->PXEPtr.offset); - if (bcmp((void *)pxe_p->Signature, S_SIZE("!PXE"))) + if (bcmp((void *)pxe_p->Signature, S_SIZE("!PXE"))) { + pxe_p = NULL; return(0); + } checksum = 0; checkptr = (uint8_t *)pxe_p; @@ -200,6 +202,7 @@ pxe_init(void) checksum += *checkptr++; if (checksum != 0) { printf("!PXE structure failed checksum. %x\n", checksum); + pxe_p = NULL; return(0); } @@ -215,7 +218,7 @@ pxe_init(void) pxe_call(PXENV_GET_CACHED_INFO); if (gci_p->Status != 0) { pxe_perror(gci_p->Status); - pxenv_p = NULL; + pxe_p = NULL; return (0); } bcopy(PTOV((gci_p->Buffer.segment << 4) + gci_p->Buffer.offset), @@ -326,6 +329,9 @@ pxe_cleanup(void) t_PXENV_UNDI_SHUTDOWN *undi_shutdown_p = (t_PXENV_UNDI_SHUTDOWN *)scratch_buffer; + if (pxe_p == NULL) + return; + pxe_call(PXENV_UNDI_SHUTDOWN); if (undi_shutdown_p->Status != 0) panic("pxe_cleanup: UNDI_SHUTDOWN failed %x", |