Skip to content

Commit c1fd036

Browse files
committed
kmod: update to 34.2
1 parent e89a08d commit c1fd036

File tree

2 files changed

+61
-3
lines changed

2 files changed

+61
-3
lines changed

utils/kmod/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=kmod
11-
PKG_VERSION:=27
12-
PKG_RELEASE:=2
11+
PKG_VERSION:=34.2
12+
PKG_RELEASE:=1
1313

1414
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
1515
PKG_SOURCE_URL:=@KERNEL/linux/utils/kernel/kmod
16-
PKG_HASH:=c1d3fbf16ca24b95f334c1de1b46f17bbe5a10b0e81e72668bdc922ebffbbc0c
16+
PKG_HASH:=7a71ffd939edbb5840ea928dd849dd25de6f6e69165e0e5b90a3f9962016e7ae
1717

1818
PKG_MAINTAINER:=Jeff Waugh <jdub@bethesignal.org>
1919
PKG_LICENSE:=LGPL-2.1-or-later
2020
PKG_LICENSE_FILES:=COPYING
21+
PKG_CPE_ID:=cpe:/a:kernel:kmod
2122

2223
PKG_FIXUP:=autoreconf
2324
PKG_INSTALL:=1
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
--- a/libkmod/libkmod-config.c
2+
+++ b/libkmod/libkmod-config.c
3+
@@ -929,7 +929,9 @@ static int conf_files_insert_sorted(struct kmod_ctx *ctx, struct kmod_list **lis
4+
bool is_single = false;
5+
6+
if (name == NULL) {
7+
- name = basename(path);
8+
+ char *pathc = strdup(path);
9+
+ name = basename(pathc);
10+
+ free(pathc);
11+
is_single = true;
12+
}
13+
14+
--- a/shared/util.c
15+
+++ b/shared/util.c
16+
@@ -160,8 +160,10 @@ char *modname_normalize(const char *modname, char buf[static PATH_MAX], size_t *
17+
char *path_to_modname(const char *path, char buf[static PATH_MAX], size_t *len)
18+
{
19+
const char *modname;
20+
+ char *pathc = strdup(path);
21+
22+
- modname = basename(path);
23+
+ modname = basename(pathc);
24+
+ free(pathc);
25+
if (modname == NULL || modname[0] == '\0')
26+
return NULL;
27+
28+
--- a/tools/depmod.c
29+
+++ b/tools/depmod.c
30+
@@ -797,14 +797,17 @@ static int cfg_files_insert_sorted(struct cfg_file ***p_files, size_t *p_n_files
31+
struct cfg_file **files, *f;
32+
size_t i, n_files, namelen, dirlen;
33+
void *tmp;
34+
+ char *dirc;
35+
36+
dirlen = strlen(dir);
37+
if (name != NULL)
38+
namelen = strlen(name);
39+
else {
40+
- name = basename(dir);
41+
+ dirc = strdup(dir);
42+
+ name = basename(dirc);
43+
namelen = strlen(name);
44+
dirlen -= namelen + 1;
45+
+ free(dirc);
46+
}
47+
48+
n_files = *p_n_files;
49+
@@ -2621,7 +2624,7 @@ static int depmod_output(struct depmod *depmod, FILE *out)
50+
int fd;
51+
int n;
52+
53+
- n = snprintf(tmp, sizeof(tmp), "%s.%i.%lli.%lli", itr->name,
54+
+ n = snprintf(tmp, sizeof(tmp), "%s.%i.%" PRId64 ".%" PRId64, itr->name,
55+
getpid(), (long long)tv.tv_usec,
56+
(long long)tv.tv_sec);
57+
if (n >= (int)sizeof(tmp)) {

0 commit comments

Comments
 (0)