diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-25 15:25:22 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-06-25 15:25:22 -0700 |
commit | 439da41ccf70f88b8fefb1950808e7dbe1cb82d0 (patch) | |
tree | f9ed1eb57bdbbd1d9ff2fd4269ac5b08c349a263 | |
parent | 35bce9696160fbed33b6bad15c632cc0b55b0758 (diff) | |
download | syslinux-439da41ccf70f88b8fefb1950808e7dbe1cb82d0.tar.gz |
dos: include the ADV in the file size to be sector mappedsyslinux-4.00-pre62
We need to include the ADV in the size of the file that must be sector
mapped.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | dos/syslinux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c index d83cadc8..9574553d 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); |