diff options
Diffstat (limited to 'libinstaller/syslxopt.c')
-rw-r--r-- | libinstaller/syslxopt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libinstaller/syslxopt.c b/libinstaller/syslxopt.c index 7ceb3ba2..b739752f 100644 --- a/libinstaller/syslxopt.c +++ b/libinstaller/syslxopt.c @@ -25,6 +25,7 @@ #include <sysexits.h> #include "../version.h" #include "syslxcom.h" +#include "syslxfs.h" #include "syslxopt.h" /* These are the options we can set their values */ @@ -65,6 +66,7 @@ const struct option long_options[] = { {"menu-save", 1, NULL, 'M'}, {"mbr", 0, NULL, 'm'}, /* DOS/Win32 only */ {"active", 0, NULL, 'a'}, /* DOS/Win32 only */ + {"device", 1, NULL, OPT_DEVICE}, {0, 0, 0, 0} }; @@ -86,7 +88,8 @@ void __attribute__ ((noreturn)) usage(int rv, enum syslinux_mode mode) /* Mounted fs installation (extlinux) */ /* Actually extlinux can also use -d to provide a directory too... */ fprintf(stderr, - "Usage: %s [options] directory\n", + "Usage: %s [options] directory\n" + " --device Force use of a specific block device (experts only)\n", program); break; @@ -209,6 +212,11 @@ void parse_options(int argc, char *argv[], enum syslinux_mode mode) case 'a': opt.activate_partition = 1; break; + case OPT_DEVICE: + if (mode != MODE_EXTLINUX) + usage(EX_USAGE, mode); + opt.device = optarg; + break; case 'v': fprintf(stderr, "%s " VERSION_STR " Copyright 1994-" YEAR_STR |