diff options
| author | Roland McGrath <[email protected]> | 2009-01-08 20:53:26 -0800 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2009-01-08 20:53:26 -0800 |
| commit | a4b1a95434b90ed147e33363d92e24a035b6b775 (patch) | |
| tree | 83aabeae72d4777ba7a1c16e5a37d0c94cf365f3 | |
| parent | 7a647878b28ec3dee77c76cccc76330c1a05e58d (diff) | |
Make -k/-K prune "source" subdirectory.
| -rw-r--r-- | libdwfl/ChangeLog | 6 | ||||
| -rw-r--r-- | libdwfl/linux-kernel-modules.c | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 0e376862..2ddfc3af 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,9 @@ +2009-01-08 Roland McGrath <[email protected]> + + * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): + Skip subdirectory named "source". + (dwfl_linux_kernel_find_elf): Likewise. + 2009-01-06 Roland McGrath <[email protected]> * linux-kernel-modules.c (check_suffix): New function. diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c index 753e9bc9..e07073cd 100644 --- a/libdwfl/linux-kernel-modules.c +++ b/libdwfl/linux-kernel-modules.c @@ -319,6 +319,15 @@ dwfl_linux_kernel_report_offline (Dwfl *dwfl, const char *release, FTSENT *f; while ((f = fts_read (fts)) != NULL) { + /* Skip a "source" subtree, which tends to be large. + This insane hard-coding of names is what depmod does too. */ + if (f->fts_namelen == sizeof "source" - 1 + && !strcmp (f->fts_name, "source")) + { + fts_set (fts, f, FTS_SKIP); + continue; + } + switch (f->fts_info) { case FTS_F: @@ -682,6 +691,15 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod, int error = ENOENT; while ((f = fts_read (fts)) != NULL) { + /* Skip a "source" subtree, which tends to be large. + This insane hard-coding of names is what depmod does too. */ + if (f->fts_namelen == sizeof "source" - 1 + && !strcmp (f->fts_name, "source")) + { + fts_set (fts, f, FTS_SKIP); + continue; + } + error = ENOENT; switch (f->fts_info) { |
