summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-06-08 00:18:40 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-06-08 20:14:13 +0900
commit49c3ca34f7dbe5227c0163cba4deb5d29e145fae (patch)
tree9579057c219628e6efec44c118f628f8d765b335
parent7bf179de5b2dfae54a6839eaf7caba44a888ee2e (diff)
downloadlinux-49c3ca34f7dbe5227c0163cba4deb5d29e145fae.tar.bz2
scripts/nsdeps: adjust to the format change of *.mod files
Commit 22f26f21774f ("kbuild: get rid of duplication in *.mod files") changed the format of *.mod files to put one object per line, but missed to adjust scripts/nsdeps. Fixes: 22f26f21774f ("kbuild: get rid of duplication in *.mod files") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r--scripts/nsdeps5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/nsdeps b/scripts/nsdeps
index 04c4b96e95ec..f1718cc0d700 100644
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -34,9 +34,8 @@ generate_deps() {
local mod=${1%.ko:}
shift
local namespaces="$*"
- local mod_source_files="`cat $mod.mod | sed -n 1p \
- | sed -e 's/\.o/\.c/g' \
- | sed "s|[^ ]* *|${src_prefix}&|g"`"
+ local mod_source_files=$(sed "s|^\(.*\)\.o$|${src_prefix}\1.c|" $mod.mod)
+
for ns in $namespaces; do
echo "Adding namespace $ns to module $mod.ko."
generate_deps_for_ns $ns "$mod_source_files"