SRCS = syslinux.c \
../libinstaller/fat.c \
../libinstaller/syslxmod.c \
+ ../libinstaller/setadv.c \
../libinstaller/bootsect_bin.c \
../libinstaller/ldlinux_bin.c \
$(wildcard ../libfat/*.c)
#include "syslinux.h"
#include "libfat.h"
+#include "setadv.h"
char *program; /* Name of program */
char *device; /* Device to install to */
exit(1);
}
+ /*
+ * Create a vacuous ADV in memory. This should be smarter.
+ */
+ syslinux_reset_adv(syslinux_adv);
+
/* This command may fail legitimately */
system("mattrib -h -r -s s:/ldlinux.sys 2>/dev/null");
mtp = popen("mcopy -D o -D O -o - s:/ldlinux.sys", "w");
- if (!mtp || (fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
- != syslinux_ldlinux_len) ||
+ if (!mtp ||
+ fwrite(syslinux_ldlinux, 1, syslinux_ldlinux_len, mtp)
+ != syslinux_ldlinux_len ||
+ fwrite(syslinux_adv, 1, 2 * ADV_SIZE, mtp)
+ != 2 * ADV_SIZE ||
(status = pclose(mtp), !WIFEXITED(status) || WEXITSTATUS(status))) {
die("failed to create ldlinux.sys");
}