summaryrefslogtreecommitdiff
path: root/libinstaller
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-01-25 16:53:42 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2011-01-25 16:53:42 -0800
commit036fa4e1a8aefeba3f39ebd634fe242b0ab84ce3 (patch)
treee84359406f8fdaae2fc004128e12245e93e84867 /libinstaller
parentac1a3f7dc145eafd199f2d14d26b34c77af7d586 (diff)
downloadsyslinux-036fa4e1a8aefeba3f39ebd634fe242b0ab84ce3.tar.gz
disk: put a magic at the end of the boot sector
Put a magic signature at the end of the boot sector, and a backpointer to the code that contains the pointer to the main code extent. This is useful for integrity-checking tools, and could help the installer in the future. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'libinstaller')
-rw-r--r--libinstaller/syslxint.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/libinstaller/syslxint.h b/libinstaller/syslxint.h
index 14a7fc2b..80c40f76 100644
--- a/libinstaller/syslxint.h
+++ b/libinstaller/syslxint.h
@@ -1,6 +1,7 @@
/* ----------------------------------------------------------------------- *
*
* Copyright 2007-2008 H. Peter Anvin - All Rights Reserved
+ * Copyright 2009-2011 Intel Corporation; author: H. Peter Anvin
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -156,6 +157,7 @@ void memcpy_from_sl(void *dst, const void *src, size_t len);
#endif
#define LDLINUX_MAGIC 0x3eb202fe
+#define BS_MAGIC_VER (0x1b << 9)
/* Patch area for disk-based installers */
struct patch_area {
@@ -214,7 +216,7 @@ struct boot_sector {
uint32_t VolumeID;
char VolumeLabel[11];
char FileSysType[8];
- uint8_t Code[448];
+ uint8_t Code[442];
} __attribute__ ((packed)) bs16;
struct {
uint32_t FATSz32;
@@ -230,10 +232,12 @@ struct boot_sector {
uint32_t VolumeID;
char VolumeLabel[11];
char FileSysType[8];
- uint8_t Code[420];
+ uint8_t Code[414];
} __attribute__ ((packed)) bs32;
} __attribute__ ((packed));
+ uint32_t bsMagic;
+ uint16_t bsForwardPtr;
uint16_t bsSignature;
} __attribute__ ((packed));