aboutsummaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-06-01 18:35:25 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-06-01 18:35:25 -0700
commit350051f3fe38c27e2c32e12aacd7417e845fd428 (patch)
tree096eb1d2b7a27566aab5d9c6254c1d603e482d30 /unix
parent43872677a6ebdb038f1b8069fc0e54e7b513cc02 (diff)
downloadsyslinux-elf-350051f3fe38c27e2c32e12aacd7417e845fd428.tar.gz
syslinux-elf-350051f3fe38c27e2c32e12aacd7417e845fd428.tar.xz
syslinux-elf-350051f3fe38c27e2c32e12aacd7417e845fd428.zip
RAID mode installer support for SYSLINUXsyslinux-3.50-pre18
Hook up RAID mode in the installers for SYSLINUX
Diffstat (limited to 'unix')
-rw-r--r--unix/syslinux.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/syslinux.c b/unix/syslinux.c
index ad729c11..5f04262a 100644
--- a/unix/syslinux.c
+++ b/unix/syslinux.c
@@ -81,7 +81,7 @@ int loop_fd = -1; /* Loop device */
void __attribute__((noreturn)) usage(void)
{
- fprintf(stderr, "Usage: %s [-sf][-d directory][-o offset] device\n", program);
+ fprintf(stderr, "Usage: %s [-sfr][-d directory][-o offset] device\n", program);
exit(1);
}
@@ -324,13 +324,16 @@ int main(int argc, char *argv[])
int err = 0;
char mntname[128];
char *ldlinux_name, **argp, *opt;
- int force = 0; /* -f (force) option */
const char *subdir = NULL;
uint32_t sectors[65]; /* 65 is maximum possible */
int nsectors = 0;
const char *errmsg;
int mnt_cookie;
+ int force = 0; /* -f (force) option */
+ int stupid = 0; /* -s (stupid) option */
+ int raid_mode = 0; /* -r (RAID) option */
+
(void)argc; /* Unused */
program = argv[0];
@@ -348,7 +351,9 @@ int main(int argc, char *argv[])
while ( *opt ) {
if ( *opt == 's' ) {
- syslinux_make_stupid(); /* Use "safe, slow and stupid" code */
+ stupid = 1;
+ } else if ( *opt == 'r' ) {
+ raid_mode = 1;
} else if ( *opt == 'f' ) {
force = 1; /* Force install */
} else if ( *opt == 'd' && argp[1] ) {
@@ -525,7 +530,7 @@ umount:
/*
* Patch ldlinux.sys and the boot sector
*/
- syslinux_patch(sectors, nsectors);
+ syslinux_patch(sectors, nsectors, stupid, raid_mode);
/*
* Write the now-patched first sector of ldlinux.sys