summaryrefslogtreecommitdiffstats
path: root/main/busybox/0001-modprobe-fix-modprobe-r-and-parsing-of-etc-modprobe..patch
blob: 8a9bfd28f54b067eac87c822d12db70d45d7a20e (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
From d8937cf61895636eb05e373c377b5b1904d51d44 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 16 Jan 2015 12:01:48 +0100
Subject: [PATCH] modprobe: fix modprobe -r and parsing of /etc/modprobe.d

This fixes a regression introduced with commit 78854520 (modprobe:
revert checking for /, stop doing basename() on modprobe args,
2015-01-01) that broke modprobe options stored in /etc/modprobe.conf and
/etc/modprobe.d/*.conf.

This also fixes modprobe -r

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
 modutils/modprobe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index ce8b0b8..0e8aa9e 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -425,7 +425,7 @@ static int do_modprobe(struct module_entry *m)
 
 		rc = 0;
 		fn = llist_pop(&m->deps); /* we leak it */
-		m2 = get_or_add_modentry(fn);
+		m2 = get_or_add_modentry(bb_get_last_path_component_nostrip(fn));
 
 		if (option_mask32 & OPT_REMOVE) {
 			/* modprobe -r */
-- 
2.2.2