diff options
Diffstat (limited to 'trans')
-rw-r--r-- | trans/crash.c | 5 | ||||
-rw-r--r-- | trans/remap.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/trans/crash.c b/trans/crash.c index 14783cf8..3c244515 100644 --- a/trans/crash.c +++ b/trans/crash.c @@ -640,7 +640,10 @@ parse_opt (int opt, char *arg, struct argp_state *state) { char *errp; if (! template_valid (arg, &errp)) - error (1, 0, "Invalid template: ...'%s'", errp); + { + argp_error (state, "Invalid template: ...'%s'", errp); + return EINVAL; + } } corefile_template = arg; break; diff --git a/trans/remap.c b/trans/remap.c index 63434f0f..5afbaa02 100644 --- a/trans/remap.c +++ b/trans/remap.c @@ -98,7 +98,11 @@ parse_opt (int key, char *arg, struct argp_state *state) { case ARGP_KEY_ARG: if (arg[0] != '/') - error (1, 0, "remap only works with absolute paths\n"); + { + argp_error (state, "remap only works with absolute paths: %s", + arg); + return EINVAL; + } /* Skip heading slashes */ while (arg[0] == '/') |