aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-07-06 15:39:38 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-07-06 17:01:04 +0200
commit90b8dec39f98e83648301f1ad5dcd06597afb3ac (patch)
tree1c251ef1b2e7200e6199acc31006fcc37b6ae16b /main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch
parent8d37b00520d39566c515e8040616ac1ad9614bf7 (diff)
downloadaports-90b8dec39f98e83648301f1ad5dcd06597afb3ac.tar.gz
aports-90b8dec39f98e83648301f1ad5dcd06597afb3ac.tar.bz2
aports-90b8dec39f98e83648301f1ad5dcd06597afb3ac.tar.xz
main/busybox: 1.27.0
Diffstat (limited to 'main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch')
-rw-r--r--main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch62
1 files changed, 33 insertions, 29 deletions
diff --git a/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch b/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch
index ccd4f25ffa..ee4dfb1b75 100644
--- a/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch
+++ b/main/busybox/0007-depmod-support-generating-kmod-binary-index-files.patch
@@ -1,7 +1,7 @@
-From 0445b9734e02856a66cc7925a6816f26fedc822d Mon Sep 17 00:00:00 2001
+From c7d6c398844aca9651b7f01edadd9a8284919c89 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Sun, 25 Oct 2015 22:21:41 +0200
-Subject: [PATCH 07/12] depmod: support generating kmod binary index files
+Subject: [PATCH 07/11] depmod: support generating kmod binary index files
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -18,15 +18,15 @@ Signed-off-by: Timo Teräs <timo.teras@iki.fi>
modutils/Config.src | 10 ++
modutils/depmod.c | 281 ++++++++++++++++++++++++++++++++++++++++++----------
modutils/modprobe.c | 15 ---
- modutils/modutils.c | 27 ++++-
+ modutils/modutils.c | 31 ++++++
modutils/modutils.h | 15 +++
- 5 files changed, 281 insertions(+), 67 deletions(-)
+ 5 files changed, 286 insertions(+), 66 deletions(-)
diff --git a/modutils/Config.src b/modutils/Config.src
-index 4227f356a..6680044fc 100644
+index 9b76c83d2..5ab51d68b 100644
--- a/modutils/Config.src
+++ b/modutils/Config.src
-@@ -118,6 +118,16 @@ config FEATURE_MODUTILS_ALIAS
+@@ -152,6 +152,16 @@ config FEATURE_MODUTILS_ALIAS
Say Y if unsure.
@@ -41,10 +41,10 @@ index 4227f356a..6680044fc 100644
+ modutils and kmod (binaries and library).
+
config FEATURE_MODUTILS_SYMBOLS
- bool "Support for module.symbols file"
+ bool "Support module.symbols file"
default y
diff --git a/modutils/depmod.c b/modutils/depmod.c
-index b9347027e..e3cea18c1 100644
+index b7965ebd2..73ba7d0f4 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -2,7 +2,7 @@
@@ -56,7 +56,7 @@ index b9347027e..e3cea18c1 100644
* Copyright (c) 2008 Vladimir Dronnikov
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
-@@ -25,6 +25,24 @@
+@@ -26,6 +26,24 @@
#include "modutils.h"
#include <sys/utsname.h> /* uname() */
@@ -81,7 +81,7 @@ index b9347027e..e3cea18c1 100644
/*
* Theory of operation:
* - iterate over all modules and record their full path
-@@ -52,18 +70,12 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
+@@ -53,18 +71,12 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
for (ptr = image; ptr < image + len - 10; ptr++) {
if (is_prefixed_with(ptr, "depends=")) {
@@ -102,7 +102,7 @@ index b9347027e..e3cea18c1 100644
} else if (ENABLE_FEATURE_MODUTILS_SYMBOLS
&& is_prefixed_with(ptr, "__ksymtab_")
) {
-@@ -73,9 +85,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
+@@ -74,9 +86,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA
) {
continue;
}
@@ -116,7 +116,7 @@ index b9347027e..e3cea18c1 100644
}
free(image);
-@@ -107,12 +120,6 @@ static void order_dep_list(module_db *modules, module_entry *start, llist_t *add
+@@ -108,12 +121,6 @@ static void order_dep_list(module_db *modules, module_entry *start, llist_t *add
}
}
@@ -129,7 +129,7 @@ index b9347027e..e3cea18c1 100644
//usage:#if !ENABLE_MODPROBE_SMALL
//usage:#define depmod_trivial_usage "[-n] [-b BASE] [VERSION] [MODFILES]..."
//usage:#define depmod_full_usage "\n\n"
-@@ -166,6 +173,169 @@ enum {
+@@ -167,6 +174,169 @@ enum {
OPT_C = (1 << 9), /* -C,--config etc_modules_conf: ignored */
};
@@ -299,7 +299,7 @@ index b9347027e..e3cea18c1 100644
int depmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int depmod_main(int argc UNUSED_PARAM, char **argv)
{
-@@ -177,6 +347,8 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
+@@ -178,6 +348,8 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
unsigned i;
int tmp;
@@ -308,7 +308,7 @@ index b9347027e..e3cea18c1 100644
getopt32(argv, "aAb:eF:nruqC:", &moddir_base, NULL, NULL);
argv += optind;
-@@ -209,53 +381,60 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
+@@ -210,53 +382,60 @@ int depmod_main(int argc UNUSED_PARAM, char **argv)
}
/* Generate dependency and alias files */
@@ -403,10 +403,10 @@ index b9347027e..e3cea18c1 100644
if (ENABLE_FEATURE_CLEAN_UP)
moddb_free(&modules);
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
-index d404ef92f..72f449978 100644
+index 51ede9204..d1fcc0b7f 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
-@@ -189,21 +189,6 @@ struct globals {
+@@ -192,21 +192,6 @@ struct globals {
static int read_config(const char *path);
@@ -429,10 +429,10 @@ index d404ef92f..72f449978 100644
{
return moddb_get_or_create(&G.db, module);
diff --git a/modutils/modutils.c b/modutils/modutils.c
-index d36caaf68..aecfc2acb 100644
+index 6f7cd9721..257089af4 100644
--- a/modutils/modutils.c
+++ b/modutils/modutils.c
-@@ -70,6 +70,21 @@ void FAST_FUNC moddb_free(module_db *db)
+@@ -66,6 +66,21 @@ void FAST_FUNC moddb_free(module_db *db)
}
}
@@ -454,11 +454,12 @@ index d36caaf68..aecfc2acb 100644
void FAST_FUNC replace(char *s, char what, char with)
{
while (*s) {
-@@ -81,7 +96,17 @@ void FAST_FUNC replace(char *s, char what, char with)
+@@ -75,6 +90,22 @@ void FAST_FUNC replace(char *s, char what, char with)
+ }
+ }
- char* FAST_FUNC replace_underscores(char *s)
- {
-- replace(s, '-', '_');
++char* FAST_FUNC replace_underscores(char *s)
++{
+ int i;
+ for (i = 0; s[i]; i++) {
+ switch (s[i]) {
@@ -470,11 +471,14 @@ index d36caaf68..aecfc2acb 100644
+ break;
+ }
+ }
- return s;
- }
-
++ return s;
++}
++
+ int FAST_FUNC string_to_llist(char *string, llist_t **llist, const char *delim)
+ {
+ char *tok;
diff --git a/modutils/modutils.h b/modutils/modutils.h
-index 2cbd1448a..dd6f173f3 100644
+index 4a702e97c..c07d961bd 100644
--- a/modutils/modutils.h
+++ b/modutils/modutils.h
@@ -18,6 +18,20 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN
@@ -504,8 +508,8 @@ index 2cbd1448a..dd6f173f3 100644
+char *gather_options_str(char *opts, const char *append) FAST_FUNC;
void replace(char *s, char what, char with) FAST_FUNC;
- char *replace_underscores(char *s) FAST_FUNC;
int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC;
+ char *filename2modname(const char *filename, char *modname) FAST_FUNC;
--
-2.11.0
+2.13.2