From: Mark Wielaard Date: Mon, 16 Oct 2017 11:25:33 +0000 (+0200) Subject: libdwfl: When the kernel is found, but not the modules warn, don't fail. X-Git-Tag: elfutils-0.171~115 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=557c000db9ee0a1df8c10723b6c8df5e01985208;p=thirdparty%2Felfutils.git libdwfl: When the kernel is found, but not the modules warn, don't fail. For -k the argp parser could fail to find the modules after the kernel itself was already found. Calling failure at this point closes the Dwfl, which isn't necessary. Just warn about the missing modules and continue with the kernel only Dwfl. Signed-off-by: Mark Wielaard --- diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 2008c6a1b..112620fab 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,8 @@ +2017-10-16 Mark Wielaard + + * argp-std.c (parse_opt): For -k call argp_failure not failure to + keep dwfl around. + 2017-07-26 Yunlian Jiang * argp-std.c (failure): Move to file scope. diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 498ace21f..8ee915870 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -238,7 +238,7 @@ parse_opt (int key, char *arg, struct argp_state *state) result = INTUSE(dwfl_linux_kernel_report_modules) (dwfl); if (result != 0) /* Non-fatal to have no modules since we do have the kernel. */ - failure (dwfl, result, _("cannot find kernel modules"), state); + argp_failure (state, 0, result, _("cannot find kernel modules")); opt->dwfl = dwfl; } else