kmod: update to 9.
This commit is contained in:
parent
df9b6aa59b
commit
ed35758291
3 changed files with 2 additions and 69 deletions
|
@ -1,34 +0,0 @@
|
||||||
From c7d5a60d3df735a3816bbc1ff1b416a803a4f7a6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dave Reisner <dreisner@archlinux.org>
|
|
||||||
Date: Mon, 7 May 2012 19:41:41 -0400
|
|
||||||
Subject: [PATCH 1/2] libkmod-file: gracefully handle errors from zlib
|
|
||||||
|
|
||||||
zlib won't necessarily set the system errno, and this is particularly
|
|
||||||
evident on corrupted data (which results in a double free). Use zlib's
|
|
||||||
gzerror to detect the failure, returning a generic EINVAL when zlib
|
|
||||||
doesn't provide us with an errno.
|
|
||||||
---
|
|
||||||
libkmod/libkmod-file.c | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/libkmod/libkmod-file.c b/libkmod/libkmod-file.c
|
|
||||||
index 46ad8d9..8beb7e3 100644
|
|
||||||
--- libkmod/libkmod-file.c
|
|
||||||
+++ libkmod/libkmod-file.c
|
|
||||||
@@ -199,7 +199,13 @@ static int load_zlib(struct kmod_file *file)
|
|
||||||
if (r == 0)
|
|
||||||
break;
|
|
||||||
else if (r < 0) {
|
|
||||||
- err = -errno;
|
|
||||||
+ int gzerr;
|
|
||||||
+ const char *gz_errmsg = gzerror(file->gzf, &gzerr);
|
|
||||||
+
|
|
||||||
+ ERR(file->ctx, "gzip: %s\n", gz_errmsg);
|
|
||||||
+
|
|
||||||
+ /* gzip might not set errno here */
|
|
||||||
+ err = gzerr == Z_ERRNO ? -errno : -EINVAL;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
did += r;
|
|
||||||
--
|
|
||||||
1.7.10.1
|
|
|
@ -1,33 +0,0 @@
|
||||||
From 819f79a24d58e3c8429f1631df2f8f85a2f95d4a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dave Reisner <dreisner@archlinux.org>
|
|
||||||
Date: Mon, 7 May 2012 19:41:42 -0400
|
|
||||||
Subject: [PATCH 2/2] depmod: report failures in loading symbols
|
|
||||||
|
|
||||||
Previously, depmod would relegate failures of kmod_module_get_symbols()
|
|
||||||
to debug output, assuming the "error" was simply a lack of symbols.
|
|
||||||
Leave the ENOENT return to debug output, but report anything else as a
|
|
||||||
real error.
|
|
||||||
---
|
|
||||||
tools/kmod-depmod.c | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c
|
|
||||||
index e89dff6..bceb407 100644
|
|
||||||
--- tools/kmod-depmod.c
|
|
||||||
+++ tools/kmod-depmod.c
|
|
||||||
@@ -1542,8 +1542,11 @@ static int depmod_load_symbols(struct depmod *depmod)
|
|
||||||
struct kmod_list *l, *list = NULL;
|
|
||||||
int err = kmod_module_get_symbols(mod->kmod, &list);
|
|
||||||
if (err < 0) {
|
|
||||||
- DBG("ignoring %s: no symbols: %s\n",
|
|
||||||
- mod->path, strerror(-err));
|
|
||||||
+ if (err == -ENOENT)
|
|
||||||
+ DBG("ignoring %s: no symbols\n", mod->path);
|
|
||||||
+ else
|
|
||||||
+ ERR("failed to load symbols from %s: %s\n",
|
|
||||||
+ mod->path, strerror(-err));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
kmod_list_foreach(l, list) {
|
|
||||||
--
|
|
||||||
1.7.10.1
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Template file for 'kmod'
|
# Template file for 'kmod'
|
||||||
pkgname=kmod
|
pkgname=kmod
|
||||||
version=8
|
version=9
|
||||||
revision=1
|
revision=1
|
||||||
homepage="http://git.profusion.mobi/cgit.cgi/kmod.git"
|
homepage="http://git.profusion.mobi/cgit.cgi/kmod.git"
|
||||||
distfiles="${KERNEL_SITE}/utils/kernel/kmod/kmod-${version}.tar.xz"
|
distfiles="${KERNEL_SITE}/utils/kernel/kmod/kmod-${version}.tar.xz"
|
||||||
|
@ -13,7 +13,7 @@ subpackages="libkmod libkmod-devel"
|
||||||
short_desc="Linux kernel module handling"
|
short_desc="Linux kernel module handling"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
license="GPL-2"
|
license="GPL-2"
|
||||||
checksum=35f7d1dfcf62ea3d6da1ed0ee41a7997333680033609c5e9658f4fe8d997734d
|
checksum=0607267cb62dbc9009d0719f442a56f97f64d9983e20dbcaedfff9073abdcecf
|
||||||
long_desc="
|
long_desc="
|
||||||
kmod is a set of tools to handle common tasks with Linux kernel modules like
|
kmod is a set of tools to handle common tasks with Linux kernel modules like
|
||||||
insert, remove, list, check properties, resolve dependencies and aliases.
|
insert, remove, list, check properties, resolve dependencies and aliases.
|
||||||
|
|
Loading…
Reference in a new issue