aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/mstructs.h
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2010-03-09 16:54:17 -0500
committerShao Miller <shao.miller@yrdsb.edu.on.ca>2010-06-11 01:49:10 +0000
commit3397b50cfc534f7ee0b65b7501b1081df03a106b (patch)
tree8aa30881eda34070ea0ef305b30d1f21d9d64b24 /memdisk/mstructs.h
parentec3733b81f4771a4b8e212edd9bd4a8600a2d382 (diff)
downloadsyslinux-3397b50cfc534f7ee0b65b7501b1081df03a106b.tar.gz
syslinux-3397b50cfc534f7ee0b65b7501b1081df03a106b.tar.xz
syslinux-3397b50cfc534f7ee0b65b7501b1081df03a106b.zip
memdisk: Change patch area to include the entire MDI
Previously, the patch area began after the beginning of the MDI, but continued past its end. This is difficult to express with C structures, so we've simply changed the patch area to include the entire MDI. So it now includes the MDI size and MEMDISK version info, which we simply make constant to avoid modifying. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Diffstat (limited to 'memdisk/mstructs.h')
-rw-r--r--memdisk/mstructs.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/memdisk/mstructs.h b/memdisk/mstructs.h
index ee9568f1..9e828185 100644
--- a/memdisk/mstructs.h
+++ b/memdisk/mstructs.h
@@ -88,8 +88,13 @@ struct edd_dpt {
/* Requirement for struct edd4_cd_pkt */
#include "../memdisk/eltorito.h"
+/* Official MEMDISK Info structure ("MDI") */
MEMDISK_PACKED_PREFIX
-struct patch_area {
+struct mdi {
+ const uint16_t bytes;
+ const uint8_t version_minor;
+ const uint8_t version_major;
+
uint32_t diskbuf;
uint32_t disksize;
real_addr_t cmdline;
@@ -102,7 +107,12 @@ struct patch_area {
uint8_t _pad1;
uint16_t dpt_ptr;
- /* End of the official MemDisk_Info */
+} MEMDISK_PACKED_POSTFIX;
+
+MEMDISK_PACKED_PREFIX
+struct patch_area {
+ struct mdi mdi;
+
uint8_t driveshiftlimit; /* Do not shift drives above this region */
uint8_t _pad2; /* Pad to DWORD */
uint16_t _pad3; /* Pad to QWORD */