summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Aleaxander <Aleaxander@gmail.com>2009-08-08 17:03:56 +0800
committerLiu Aleaxander <Aleaxander@gmail.com>2009-08-08 17:03:56 +0800
commitde0b71af1e9d141c3234aa10376d5bcf79e47c55 (patch)
tree2e65148515eccf17f123afa59d44de806d5f2858
parent99756b937dc3d1f811ec5dc5eb6328b9c3a73708 (diff)
downloadsyslinux-de0b71af1e9d141c3234aa10376d5bcf79e47c55.tar.gz
Core:EXTLINUX: fix the bug of open_file_t struct in extlinux
The size of open_file_t structure in extlinux is twice than in the others derivatiives. So we should cut the MAX_OPEN to half. Signed-off-by: Liu Aleaxander <Aleaxander@gmail.com>
-rw-r--r--core/ext2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ext2.c b/core/ext2.c
index 153f368e..965f1b43 100644
--- a/core/ext2.c
+++ b/core/ext2.c
@@ -8,7 +8,8 @@
#define FILENAME_MAX_LG2 8
#define FILENAME_MAX (1 << FILENAME_MAX_LG2)
-#define MAX_OPEN_LG2 6
+/* The size of open_file_t in extlinux is double of in others */
+#define MAX_OPEN_LG2 (6 - 1)
#define MAX_OPEN (1 << MAX_OPEN_LG2)
#define MAX_SYMLINKS 64
#define SYMLINK_SECTORS 2
@@ -22,6 +23,7 @@ struct open_file_t {
sector_t file_in_sec; /* Sector where inode lives */
uint16_t file_in_off;
uint16_t file_mode;
+ uint32_t pad[3]; /* pad to 2^5 == 0x20 bytes */
};
static char SymlinkBuf[SYMLINK_SECTORS * SECTOR_SIZE + 64];