aboutsummaryrefslogtreecommitdiffstats
path: root/libinstaller/syslxmod.c
diff options
context:
space:
mode:
authorAlek Du <alek.du@intel.com>2010-05-19 09:39:57 +0800
committerH. Peter Anvin <hpa@zytor.com>2010-05-20 19:57:46 -0700
commite4fc443f9b70f188963ff33e0a16ccb72a553540 (patch)
tree5abf92a66a5a741e61375478ae41bb3383dcec04 /libinstaller/syslxmod.c
parent38eb0724824139a81342e3f676910187bc57ba9d (diff)
downloadsyslinux-e4fc443f9b70f188963ff33e0a16ccb72a553540.tar.gz
syslinux-e4fc443f9b70f188963ff33e0a16ccb72a553540.tar.xz
syslinux-e4fc443f9b70f188963ff33e0a16ccb72a553540.zip
unify common parts of extlinux and syslinux installer
Thus we can share same command line options and reduce a lot of dup code... Seems like a big patch, but the changes are quite safe, no much logical change. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'libinstaller/syslxmod.c')
-rw-r--r--libinstaller/syslxmod.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libinstaller/syslxmod.c b/libinstaller/syslxmod.c
index be06b9a2..9ab139c6 100644
--- a/libinstaller/syslxmod.c
+++ b/libinstaller/syslxmod.c
@@ -261,7 +261,7 @@ int syslinux_patch(const uint32_t * sectors, int nsectors,
/* Set up the totals */
dw = syslinux_ldlinux_len >> 2; /* COMPLETE dwords, excluding ADV */
set_16_sl(&patcharea->data_sectors, nsect); /* Not including ADVs */
- set_16_sl(&patcharea->adv_sectors, 0); /* ADVs not supported yet */
+ set_16_sl(&patcharea->adv_sectors, 2); /* ADVs need 2 sectors */
set_32_sl(&patcharea->dwords, dw);
/* Set the sector pointers */
@@ -269,6 +269,7 @@ int syslinux_patch(const uint32_t * sectors, int nsectors,
get_16_sl(&patcharea->secptroffset));
nptrs = get_16_sl(&patcharea->secptrcnt);
+ nsect += 2;
while (--nsect) { /* the first sector is in bs->NextSector */
set_32_sl(wp++, *sectors++);
nptrs--;