diff options
author | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-11-29 11:58:47 +0000 |
---|---|---|
committer | Jonathan Maw <jonathan.maw@codethink.co.uk> | 2012-11-29 11:58:47 +0000 |
commit | 0846de0e1795a30512f5575388d163ea548125de (patch) | |
tree | e1bc03fa83c61165f48ffe3f528ac5496332872a /libinstaller/syslxopt.c | |
parent | ede8500d7c710e4ddf650f1a1ef3ccf2a89e5313 (diff) | |
parent | 7307d60063ee4303da4de45f9d984fdc8df92146 (diff) | |
download | syslinux-baserock/genivi/morph.tar.gz |
Merge the latest changes from upstreambaserock/genivi/morph
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 |