+2013-02-10 Mark Wielaard <mjw@redhat.com>
+
+ * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
+ failure messages When handling ARGP_KEY_SUCCESS because arg will
+ not have been set.
+
2013-01-30 Jan Kratochvil <jan.kratochvil@redhat.com>
* linux-proc-maps.c: Include system.h.
{
FILE *f = fopen (arg, "r");
if (f == NULL)
- nofile:
{
int code = errno;
argp_failure (state, EXIT_FAILURE, code,
{
int fd = open64 (opt->core, O_RDONLY);
if (fd < 0)
- goto nofile;
+ {
+ int code = errno;
+ argp_failure (state, EXIT_FAILURE, code,
+ "cannot open '%s'", opt->core);
+ return code;
+ }
Elf *core;
Dwfl_Error error = __libdw_open_file (&fd, &core, true, false);
else if (opt->e)
{
if (INTUSE(dwfl_report_offline) (dwfl, "", opt->e, -1) == NULL)
- return fail (dwfl, -1, arg);
+ return fail (dwfl, -1, opt->e);
}
/* One of the three flavors has done dwfl_begin and some reporting