kbuild: fix adjust_autoksyms.sh for modules that need only one symbol
authorNicolas Pitre <nicolas.pitre@linaro.org>
Thu, 28 Apr 2016 21:33:38 +0000 (17:33 -0400)
committerMichal Marek <mmarek@suse.com>
Tue, 10 May 2016 15:25:29 +0000 (17:25 +0200)
When only one symbol was listed and therefore the line didn't contain
any space to separate multiple symbols, that symbol got ignored.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/adjust_autoksyms.sh

index 5bf538f1ed79b0f733132a3173888c53511b6d1a..8dc1918b6783dd337590f97b5aa33be5125980ea 100755 (executable)
@@ -59,7 +59,7 @@ cat > "$new_ksyms_file" << EOT
  */
 
 EOT
-sed -ns -e '3s/ /\n/gp' "$MODVERDIR"/*.mod | sort -u |
+sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u |
 while read sym; do
        if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then
                sym="${sym#_}"
This page took 0.026931 seconds and 5 git commands to generate.