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 <mark@klomp.org>
+2017-10-16 Mark Wielaard <mark@klomp.org>
+
+ * argp-std.c (parse_opt): For -k call argp_failure not failure to
+ keep dwfl around.
+
2017-07-26 Yunlian Jiang <yunlian@google.com>
* argp-std.c (failure): Move to file scope.
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