summaryrefslogtreecommitdiffstats
path: root/libdwfl/argp-std.c
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2017-10-16 13:25:33 +0200
committerMark Wielaard <[email protected]>2017-10-20 13:50:56 +0200
commit557c000db9ee0a1df8c10723b6c8df5e01985208 (patch)
tree95140af2f800be1697ba20e2ac6fa3164d355475 /libdwfl/argp-std.c
parent4f977868eab2ea196a44e9d96c9e777134411391 (diff)
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 <[email protected]>
Diffstat (limited to 'libdwfl/argp-std.c')
-rw-r--r--libdwfl/argp-std.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c
index 498ace21..8ee91587 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