summaryrefslogtreecommitdiff
path: root/src/mcpp-options.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mcpp-options.c')
-rw-r--r--src/mcpp-options.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mcpp-options.c b/src/mcpp-options.c
index 62fafc6..8d0d8cd 100644
--- a/src/mcpp-options.c
+++ b/src/mcpp-options.c
@@ -139,6 +139,24 @@ mcpp_handle_options( mcpp_options *opts, int argc, char **argv )
if( strcmp(arg, "--help") == 0 ) opts->help = 1;
else if( strcmp(arg, "--version") == 0 ) opts->version = 1;
else if( strcmp(arg, "--no-config") == 0 ) opts->no_config = 1;
+ else if( strncmp(arg, "--sys-root=", 11) == 0 )
+ {
+ if( arg[11] == 0 )
+ {
+ fprintf( stderr, "%s: empty path in '--sys-root='\n",
+ opts->progname );
+ return( -1 );
+ }
+ opts->sys_root = arg + 11;
+ opts->no_config = 1;
+ }
+ else if( strcmp(arg, "--sys-root") == 0 )
+ {
+ value = option_argument(opts, argc, argv, &i, NULL, arg);
+ if( value == NULL || *value == 0 ) return( -1 );
+ opts->sys_root = value;
+ opts->no_config = 1;
+ }
else if( strcmp(arg, "--config-file") == 0 )
{
value = option_argument(opts, argc, argv, &i, NULL, arg);