summaryrefslogtreecommitdiff
path: root/core/kmod/0002-config-hardcode-the-path-to-modules-to-be-lib-module.patch
blob: f39f36ace178a69d51667f36eb182626dc5659d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From 53e7e0e42428770578ca0d54d0a9540f498f917f Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Sat, 31 Mar 2012 12:17:39 +0200
Subject: [PATCH 2/2] config: hardcode the path to modules to be /lib/modules

This means that we can move the configuration paths from /lib
to /usr/lib without having to touch the kernel and related
packages.

That can be dealt with separately at a later location, in which case
all we have to do is revert this patch.

Signed-off-by: Tom Gundersen <teg@jklm.no>
---
 libkmod/libkmod.c     |    2 +-
 tools/kmod-depmod.c   |    2 +-
 tools/kmod-modinfo.c  |    4 ++--
 tools/kmod-modprobe.c |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c
index 12c1112..11edfa0 100644
--- a/libkmod/libkmod.c
+++ b/libkmod/libkmod.c
@@ -196,7 +196,7 @@ static int log_priority(const char *priority)
 	return 0;
 }
 
-static const char *dirname_default_prefix = ROOTPREFIX "/lib/modules";
+static const char *dirname_default_prefix = "/lib/modules";
 
 static char *get_kernel_release(const char *dirname)
 {
diff --git a/tools/kmod-depmod.c b/tools/kmod-depmod.c
index 7bb1c5d..454d538 100644
--- a/tools/kmod-depmod.c
+++ b/tools/kmod-depmod.c
@@ -2634,7 +2634,7 @@ static int do_depmod(int argc, char *argv[])
 	}
 
 	cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
-				  "%s" ROOTPREFIX "/lib/modules/%s",
+				  "%s/lib/modules/%s",
 				  root == NULL ? "" : root, cfg.kversion);
 
 	if (optind == argc)
diff --git a/tools/kmod-modinfo.c b/tools/kmod-modinfo.c
index aa5223f..b13cd4b 100644
--- a/tools/kmod-modinfo.c
+++ b/tools/kmod-modinfo.c
@@ -339,7 +339,7 @@ static void help(const char *progname)
 		"\t-0, --null                  Use \\0 instead of \\n\n"
 		"\t-F, --field=FIELD           Print only provided FIELD\n"
 		"\t-k, --set-version=VERSION   Use VERSION instead of `uname -r`\n"
-		"\t-b, --basedir=DIR           Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n"
+		"\t-b, --basedir=DIR           Use DIR as filesystem root for /lib/modules\n"
 		"\t-V, --version               Show version\n"
 		"\t-h, --help                  Show this help\n",
 		progname);
@@ -439,7 +439,7 @@ static int do_modinfo(int argc, char *argv[])
 			}
 			kversion = u.release;
 		}
-		snprintf(dirname_buf, sizeof(dirname_buf), "%s" ROOTPREFIX "/lib/modules/%s",
+		snprintf(dirname_buf, sizeof(dirname_buf), "%s/lib/modules/%s",
 			 root, kversion);
 		dirname = dirname_buf;
 	}
diff --git a/tools/kmod-modprobe.c b/tools/kmod-modprobe.c
index 4760682..ccb41d8 100644
--- a/tools/kmod-modprobe.c
+++ b/tools/kmod-modprobe.c
@@ -128,7 +128,7 @@ static void help(const char *progname)
 		"\t-n, --show                  Same as --dry-run\n"
 
 		"\t-C, --config=FILE           Use FILE instead of default search paths\n"
-		"\t-d, --dirname=DIR           Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n"
+		"\t-d, --dirname=DIR           Use DIR as filesystem root for /lib/modules\n"
 		"\t-S, --set-version=VERSION   Use VERSION instead of `uname -r`\n"
 
 		"\t-s, --syslog                print to syslog, not stderr\n"
@@ -973,7 +973,7 @@ static int do_modprobe(int argc, char **orig_argv)
 			kversion = u.release;
 		}
 		snprintf(dirname_buf, sizeof(dirname_buf),
-				"%s" ROOTPREFIX "/lib/modules/%s", root,
+				"%s/lib/modules/%s", root,
 				kversion);
 		dirname = dirname_buf;
 	}
-- 
1.7.9.5