Skip to contentSkip to conversation

scripts/nsdeps: adjust to the format change of *.mod files

PATCH New Masahiro Yamada 1 participant 1 message Jun 7, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")

---

 scripts/nsdeps | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
scripts/nsdeps +2 -3
index 04c4b96e95ec..f1718cc0d700 100644
@@ -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"
Signature · 1 line
2.32.0