modprobe: fix for blacklisting
The patch makes the order of the alias/blacklist in modprobe.conf irrelevant (like module-utils' modprobe). In first patch the alias had to be defined before the blacklist which caused problems because the modprobe.conf file is read before /lib/modules/*/modules.alias. The attatched patch will mark the blacklisted module itself rather than trying to find the alias that points to the blacklisted module and test this flag later in the alias resolving stage.
This commit is contained in:
parent
dfd8282464
commit
ae84b11467
@ -332,7 +332,7 @@ static void include_conf(struct dep_t **first, struct dep_t **current, char *buf
|
|||||||
|
|
||||||
mod = skip_whitespace(buffer + 10);
|
mod = skip_whitespace(buffer + 10);
|
||||||
for (dt = *first; dt; dt = dt->m_next) {
|
for (dt = *first; dt; dt = dt->m_next) {
|
||||||
if (dt->m_isalias && strcmp(dt->m_deparr[0], mod) == 0)
|
if (strcmp(dt->m_name, mod) == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (dt)
|
if (dt)
|
||||||
@ -748,12 +748,13 @@ static void check_dep(char *mod, struct mod_list_t **head, struct mod_list_t **t
|
|||||||
|
|
||||||
// resolve alias names
|
// resolve alias names
|
||||||
while (dt->m_isalias) {
|
while (dt->m_isalias) {
|
||||||
if (dt->m_depcnt == 1 && !(ENABLE_FEATURE_MODPROBE_BLACKLIST &&
|
if (dt->m_depcnt == 1) {
|
||||||
dt->m_isblacklisted)) {
|
|
||||||
struct dep_t *adt;
|
struct dep_t *adt;
|
||||||
|
|
||||||
for (adt = depend; adt; adt = adt->m_next) {
|
for (adt = depend; adt; adt = adt->m_next) {
|
||||||
if (check_pattern(adt->m_name, dt->m_deparr[0]) == 0)
|
if (check_pattern(adt->m_name, dt->m_deparr[0]) == 0 &&
|
||||||
|
!(ENABLE_FEATURE_MODPROBE_BLACKLIST &&
|
||||||
|
adt->m_isblacklisted))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (adt) {
|
if (adt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user