[syslinux:master] dos: include the ADV in the file size to be sector mapped
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Fri Jun 25 15:27:15 PDT 2010
Commit-ID: 439da41ccf70f88b8fefb1950808e7dbe1cb82d0
Gitweb: http://syslinux.zytor.com/commit/439da41ccf70f88b8fefb1950808e7dbe1cb82d0
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Fri, 25 Jun 2010 15:25:22 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Fri, 25 Jun 2010 15:25:22 -0700
dos: include the ADV in the file size to be sector mapped
We need to include the ADV in the size of the file that must be sector
mapped.
Signed-off-by: H. Peter Anvin <hpa at linux.intel.com>
---
dos/syslinux.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dos/syslinux.c b/dos/syslinux.c
index d83cadc..9574553 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -701,7 +701,8 @@ int main(int argc, char *argv[])
* this is supposed to be a simple, privileged version
* of the installer.
*/
- 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);
lock_device(2);
fs = libfat_open(libfat_xpread, dev_fd);
More information about the Syslinux-commits
mailing list