Skip to content

Commit

Permalink
kbuild: fix scripts/adjust_autoksyms.sh* for the no modules case
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Michal Marek committed Dec 11, 2016
1 parent 0f66784 commit d073472
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/adjust_autoksyms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d073472

Please sign in to comment.