summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2016-12-08 14:17:03 -0500
committerMichal Marek <mmarek@suse.com>2016-12-11 22:30:10 +0100
commitd073472ac26f44f269d9234acd6871bbc6289532 (patch)
treebf873f3b05793ff3cea0bc92ec19093192c1c374 /scripts
parent0f66784ae2eb6ac5bc7540b891786ff062bbf630 (diff)
downloadlinux-d073472ac26f44f269d9234acd6871bbc6289532.tar.bz2
kbuild: fix scripts/adjust_autoksyms.sh* for the no modules case
When CONFIG_TRIM_UNUSED_KSYMS=y and no modules are actually selected, the adjust_autoksyms.sh script fails with: sed: can't read .tmp_versions/*.mod: No such file or directory Let's cope with that case gracefully. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/adjust_autoksyms.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/adjust_autoksyms.sh b/scripts/adjust_autoksyms.sh
index 8dc1918b6783..513da1a4a2da 100755
--- a/scripts/adjust_autoksyms.sh
+++ b/scripts/adjust_autoksyms.sh
@@ -59,6 +59,7 @@ cat > "$new_ksyms_file" << EOT
*/
EOT
+[ "$(ls -A "$MODVERDIR")" ] &&
sed -ns -e '3{s/ /\n/g;/^$/!p;}' "$MODVERDIR"/*.mod | sort -u |
while read sym; do
if [ -n "$CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX" ]; then