[PATCH] libdwfl: Handle LZMA .ko.xz compressed kernel modules.

Mark Wielaard mjw at redhat.com
Sat Aug 16 10:53:53 UTC 2014


On Fri, Aug 15, 2014 at 11:16:00AM -0700, Roland McGrath wrote:
> Typo in the log.

Found it and fixed.
And the #ifdef should have been an #if so that USE_LZMA works the same
as USE_ZLIB and USE_BZLIB when it is zero. So many typos in one tiny
patch. At least I did test it on fedora rawhide which uses xz compressed
kernel modues now.

Pushed the attached.

Cheers,

Mark
-------------- next part --------------
>From 9d29ed2989b6691457bbd602de740c4423ac8781 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw at redhat.com>
Date: Thu, 14 Aug 2014 22:07:44 +0200
Subject: [PATCH] libdwfl: Handle LZMA .ko.xz compressed kernel modules.

Linux kernel modules can not just be compressed with gz and bz2, but also
with xz.

Signed-off-by: Mark Wielaard <mjw at redhat.com>
---
 libdwfl/ChangeLog              | 4 ++++
 libdwfl/linux-kernel-modules.c | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index ab47c40..c644ffe 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-14  Mark Wielaard  <mjw at redhat.com>
+
+	* linux-kernel-modules.c (check-suffix): Also TRY .ko.xz.
+
 2014-07-24  Jan Kratochvil  <jan.kratochvil at redhat.com>
 
 	Fix report_r_debug for prelinked libraries.
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 1ad7d2f..e4065d8 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -302,6 +302,9 @@ check_suffix (const FTSENT *f, size_t namelen)
 #if USE_BZLIB
   TRY (".ko.bz2");
 #endif
+#if USE_LZMA
+  TRY (".ko.xz");
+#endif
 
   return 0;
 
-- 
1.8.3.1



More information about the elfutils-devel mailing list