diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-04-27 10:56:06 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-27 10:56:06 -0700 |
commit | 5c87f5fe02d93311b0a374ce847549fd28260f67 (patch) | |
tree | 1dc6658a6a9f8ae50e8bc8a7d86ad655edde79e0 | |
parent | 619579f87baddecc8601281215f878b57faa0f67 (diff) | |
download | syslinux-5c87f5fe02d93311b0a374ce847549fd28260f67.tar.gz |
mboot/solaris.c: fix failure case; correct copyright notice
Better handling of failed mapping; correct copyright notice.
-rw-r--r-- | com32/mboot/solaris.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/com32/mboot/solaris.c b/com32/mboot/solaris.c index 338e9eb8..1baf9c53 100644 --- a/com32/mboot/solaris.c +++ b/com32/mboot/solaris.c @@ -1,7 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 2007-2009 H. Peter Anvin - All Rights Reserved - * Copyright 2009 H. Peter Anvin - All Rights Reserved + * Copyright 2009 Intel Corporation; author: H. Peter Anvin * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation @@ -44,8 +43,10 @@ void mboot_solaris_dhcp_hack(void) if (!pxe_get_cached_info(PXENV_PACKET_TYPE_DHCP_ACK, &dhcpdata, &dhcplen)) { mbinfo.drives_addr = map_data(dhcpdata, dhcplen, 4, 0); - mbinfo.drives_length = dhcplen; - mbinfo.boot_device = 0x20ffffff; - mbinfo.flags = (mbinfo.flags & ~MB_INFO_DRIVE_INFO) | MB_INFO_BOOTDEV; + if (mbinfo.drives_addr) { + mbinfo.drives_length = dhcplen; + mbinfo.boot_device = 0x20ffffff; + mbinfo.flags = (mbinfo.flags & ~MB_INFO_DRIVE_INFO) | MB_INFO_BOOTDEV; + } } } |