diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-02-03 17:43:12 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-02-03 17:43:12 +0000 |
commit | 2896f6a30146f5a67ea2813929a8f49eeb951472 (patch) | |
tree | c35ba2217f56b51b95ed6857cd2893eff1184b2a | |
parent | 5e6ec4f96195debff3d57522eb0ac8def5cf2071 (diff) | |
download | drakx-2896f6a30146f5a67ea2813929a8f49eeb951472.tar drakx-2896f6a30146f5a67ea2813929a8f49eeb951472.tar.gz drakx-2896f6a30146f5a67ea2813929a8f49eeb951472.tar.bz2 drakx-2896f6a30146f5a67ea2813929a8f49eeb951472.tar.xz drakx-2896f6a30146f5a67ea2813929a8f49eeb951472.zip |
sort modules in the interface
-rw-r--r-- | mdk-stage1/NEWS | 1 | ||||
-rw-r--r-- | mdk-stage1/modules.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/mdk-stage1/NEWS b/mdk-stage1/NEWS index bc8456cd2..99133589e 100644 --- a/mdk-stage1/NEWS +++ b/mdk-stage1/NEWS @@ -1,3 +1,4 @@ +- sort modules in the interface - try to load squashfs_lzma too 1.32: diff --git a/mdk-stage1/modules.c b/mdk-stage1/modules.c index 53bc87d4c..c25d9358f 100644 --- a/mdk-stage1/modules.c +++ b/mdk-stage1/modules.c @@ -420,6 +420,11 @@ static enum return_type insmod_with_options(char * mod, enum driver_type type) return RETURN_OK; } +static int strsortfunc(const void *a, const void *b) +{ + return strcmp(* (char * const *) a, * (char * const *) b); +} + enum return_type ask_insmod(enum driver_type type) { enum return_type results; @@ -431,11 +436,12 @@ enum return_type ask_insmod(enum driver_type type) char ** p_modules = modules; char ** p_descrs = descrs; + qsort(dlist, string_array_length(dlist), sizeof(char *), strsortfunc); + unset_automatic(); /* we are in a fallback mode */ while (p_dlist && *p_dlist) { struct module_descr_elem * descr; - if (!strstr(*p_dlist, kernel_module_extension())) { p_dlist++; continue; |