[syslinux:master] mtools: include the size of the ADV in the mappable range
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Fri Jun 25 15:27:14 PDT 2010
Commit-ID: 35bce9696160fbed33b6bad15c632cc0b55b0758
Gitweb: http://syslinux.zytor.com/commit/35bce9696160fbed33b6bad15c632cc0b55b0758
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Fri, 25 Jun 2010 15:23:42 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Fri, 25 Jun 2010 15:23:42 -0700
mtools: include the size of the ADV in the mappable range
We need to include the size of the ADV in the range of data that needs
to be mapped.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
mtools/syslinux.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/mtools/syslinux.c b/mtools/syslinux.c
index ade8440..f5b89c9 100644
--- a/mtools/syslinux.c
+++ b/mtools/syslinux.c
@@ -261,7 +261,8 @@ int main(int argc, char *argv[])
/*
* Now, use libfat to create a block map
*/
- ldlinux_sectors = (syslinux_ldlinux_len + SECTOR_SIZE - 1) >> SECTOR_SHIFT;
+ ldlinux_sectors = (syslinux_ldlinux_len + 2 * ADV_SIZE
+ + SECTOR_SIZE - 1) >> SECTOR_SHIFT;
sectors = calloc(ldlinux_sectors, sizeof *sectors);
fs = libfat_open(libfat_xpread, dev_fd);
ldlinux_cluster = libfat_searchdir(fs, 0, "LDLINUX SYS", NULL);
More information about the Syslinux-commits
mailing list