summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
74cb86f)
The patch changes the order that the config file and command line
are parsed so that command line has precedence. It also parses
the -E option for every occurrence, otherwise the -E option is
not cumulative.
Signed-off-by: Jim Garlick <garlick@llnl.gov>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
#ifdef HAVE_SIGNAL_H
struct sigaction sa;
#endif
#ifdef HAVE_SIGNAL_H
struct sigaction sa;
#endif
- char *extended_opts = 0;
char *cp;
int res; /* result of sscanf */
#ifdef CONFIG_JBD_DEBUG
char *cp;
int res; /* result of sscanf */
#ifdef CONFIG_JBD_DEBUG
else
ctx->program_name = "e2fsck";
else
ctx->program_name = "e2fsck";
+ cp = getenv("E2FSCK_CONFIG");
+ if (cp != NULL)
+ config_fn[0] = cp;
+ profile_set_syntax_err_cb(syntax_err_report);
+ profile_init(config_fn, &ctx->profile);
+
+
while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != EOF)
switch (c) {
case 'C':
while ((c = getopt (argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDk")) != EOF)
switch (c) {
case 'C':
ctx->options |= E2F_OPT_COMPRESS_DIRS;
break;
case 'E':
ctx->options |= E2F_OPT_COMPRESS_DIRS;
break;
case 'E':
- extended_opts = optarg;
+ parse_extended_opts(ctx, optarg);
break;
case 'p':
case 'a':
break;
case 'p':
case 'a':
argv[optind]);
fatal_error(ctx, 0);
}
argv[optind]);
fatal_error(ctx, 0);
}
- if (extended_opts)
- parse_extended_opts(ctx, extended_opts);
-
- if ((cp = getenv("E2FSCK_CONFIG")) != NULL)
- config_fn[0] = cp;
- profile_set_syntax_err_cb(syntax_err_report);
- profile_init(config_fn, &ctx->profile);
profile_get_boolean(ctx->profile, "options", "report_time", 0, 0,
&c);
profile_get_boolean(ctx->profile, "options", "report_time", 0, 0,
&c);