]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdwfl: When the kernel is found, but not the modules warn, don't fail.
authorMark Wielaard <mark@klomp.org>
Mon, 16 Oct 2017 11:25:33 +0000 (13:25 +0200)
committerMark Wielaard <mark@klomp.org>
Fri, 20 Oct 2017 11:50:56 +0000 (13:50 +0200)
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>
libdwfl/ChangeLog
libdwfl/argp-std.c

index 2008c6a1be89b23228fd1351562936daa788bb40..112620fab03453ae02a77c3b114cc0947f762eae 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 498ace21f709c4b3819430a84c742a37368a8b34..8ee915870a148bed17813ce35b1afaf6384c5508 100644 (file)
@@ -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