diff options
| author | Roland McGrath <[email protected]> | 2005-10-28 06:56:24 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2005-10-28 06:56:24 +0000 |
| commit | 07d4f2fc1cb53f170a71bc13617bbdd9cb1c3c60 (patch) | |
| tree | 0cd998a48772a7857dc187899cb5bb1f8decc35b /libdwfl/linux-kernel-modules.c | |
| parent | 89757447dbcd0ac946db345fa6aa1edc76a37a11 (diff) | |
libdw/
Fixes to last changes.
tests/
2005-10-27 Roland McGrath <[email protected]>
* run-find-prologues.sh: New file.
* Makefile.am (TESTS, EXTRA_DIST): Add it.
Diffstat (limited to 'libdwfl/linux-kernel-modules.c')
| -rw-r--r-- | libdwfl/linux-kernel-modules.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index ba65c599..c219c330 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -88,7 +88,8 @@ report_kernel (Dwfl *dwfl, const char *release, int result = 0; if (fd < 0) - result = (predicate != NULL && !(*predicate) ("kernel", NULL)) ? 0 : errno; + result = ((predicate != NULL && !(*predicate) ("kernel", NULL)) + ? 0 : errno ?: ENOENT); else { bool report = true; @@ -398,7 +399,7 @@ dwfl_linux_kernel_module_section_address (void) __fsetlocking (f, FSETLOCKING_BYCALLER); - int result = (fscanf (f, "%" PRIi64 "\n", addr) == 1 ? 0 + int result = (fscanf (f, "%" PRIx64 "\n", addr) == 1 ? 0 : ferror_unlocked (f) ? errno : ENOEXEC); fclose (f); @@ -423,7 +424,7 @@ dwfl_linux_kernel_report_modules (Dwfl *dwfl) Dwarf_Addr modaddr; unsigned long int modsz; char modname[128]; - while (fscanf (f, "%128s %lu %*s %*s %*s %" PRIi64 "\n", + while (fscanf (f, "%128s %lu %*s %*s %*s %" PRIx64 "\n", modname, &modsz, &modaddr) == 3) if (INTUSE(dwfl_report_module) (dwfl, modname, modaddr, modaddr + modsz) == NULL) |
