diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-06-01 18:35:25 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-06-01 18:35:25 -0700 |
commit | 350051f3fe38c27e2c32e12aacd7417e845fd428 (patch) | |
tree | 096eb1d2b7a27566aab5d9c6254c1d603e482d30 /mtools | |
parent | 43872677a6ebdb038f1b8069fc0e54e7b513cc02 (diff) | |
download | syslinux-350051f3fe38c27e2c32e12aacd7417e845fd428.tar.gz |
RAID mode installer support for SYSLINUXsyslinux-3.50-pre18
Hook up RAID mode in the installers for SYSLINUX
Diffstat (limited to 'mtools')
-rw-r--r-- | mtools/syslinux.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mtools/syslinux.c b/mtools/syslinux.c index e65b081f..7540b2fa 100644 --- a/mtools/syslinux.c +++ b/mtools/syslinux.c @@ -45,7 +45,7 @@ off_t filesystem_offset = 0; /* Offset of filesystem */ 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); } @@ -129,7 +129,6 @@ int main(int argc, char *argv[]) struct stat st; int status; char **argp, *opt; - int force = 0; /* -f (force) option */ char mtools_conf[] = "/tmp/syslinux-mtools-XXXXXX"; const char *subdir = NULL; int mtc_fd; @@ -140,6 +139,10 @@ int main(int argc, char *argv[]) int nsectors; const char *errmsg; + int force = 0; /* -f (force) option */ + int stupid = 0; /* -s (stupid) option */ + int raid_mode = 0; /* -r (RAID) option */ + (void)argc; /* Unused */ mypid = getpid(); @@ -155,7 +158,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] ) { @@ -255,7 +260,7 @@ int main(int argc, char *argv[]) libfat_close(fs); /* 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 */ xpwrite(dev_fd, syslinux_ldlinux, 512, |