aboutsummaryrefslogtreecommitdiffstats
path: root/dos/syslinux.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2010-06-22 17:07:03 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2010-06-22 17:07:03 -0700
commit0b014e446285b7aad1e19163a15b9cc8936047d3 (patch)
tree3270ef7d7d94cbdf640bfc8f74fd679087f54abf /dos/syslinux.c
parentbdf96656c4418a691868b85cb90a80f353b0cb0b (diff)
downloadsyslinux-devel-0b014e446285b7aad1e19163a15b9cc8936047d3.tar.gz
syslinux-devel-0b014e446285b7aad1e19163a15b9cc8936047d3.tar.xz
syslinux-devel-0b014e446285b7aad1e19163a15b9cc8936047d3.zip
dos: vacuous ADV support
Vacuous ADV support: install an empty ADV. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'dos/syslinux.c')
-rw-r--r--dos/syslinux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dos/syslinux.c b/dos/syslinux.c
index 5dc34836..d83cadc8 100644
--- a/dos/syslinux.c
+++ b/dos/syslinux.c
@@ -26,6 +26,7 @@
#include "syslinux.h"
#include "libfat.h"
+#include "setadv.h"
const char *program = "syslinux"; /* Name of program */
uint16_t dos_version;
@@ -658,6 +659,11 @@ int main(int argc, char *argv[])
usage();
/*
+ * Create an ADV in memory... this should be smarter.
+ */
+ syslinux_reset_adv(syslinux_adv);
+
+ /*
* Figure out which drive we're talking to
*/
dev_fd = (device[0] & ~0x20) - 0x40;
@@ -685,6 +691,7 @@ int main(int argc, char *argv[])
set_attributes(ldlinux_name, 0);
fd = creat(ldlinux_name, 0); /* SYSTEM HIDDEN READONLY */
write_ldlinux(fd);
+ write_file(fd, syslinux_adv, 2 * ADV_SIZE);
close(fd);
set_attributes(ldlinux_name, 0x07); /* SYSTEM HIDDEN READONLY */