diff options
author | Jessica Yu <jeyu@kernel.org> | 2019-11-05 11:10:23 +0100 |
---|---|---|
committer | Jessica Yu <jeyu@kernel.org> | 2019-11-05 14:08:29 +0100 |
commit | 57baec7b1b0459ef885e816d8c28a9d9a62bb8de (patch) | |
tree | dede0763c0c002e270964bd2c06aa105643405e8 /scripts/Makefile.package | |
parent | a99d8080aaf358d5d23581244e5da23b35e340b9 (diff) | |
download | lwn-57baec7b1b0459ef885e816d8c28a9d9a62bb8de.tar.gz lwn-57baec7b1b0459ef885e816d8c28a9d9a62bb8de.zip |
scripts/nsdeps: make sure to pass all module source files to spatch
The nsdeps script passes a list of the module source files to
generate_deps_for_ns() as a space delimited string named $mod_source_files,
which then passes it to spatch. But since $mod_source_files is not encased
in quotes, each source file in that string is treated as a separate shell
function argument (as $2, $3, $4, etc.). However, the spatch invocation
only refers to $2, so only the first file out of $mod_source_files is
processed by spatch.
This causes problems (namely, the MODULE_IMPORT_NS() statement doesn't
get inserted) when a module is composed of many source files and the
"main" module file containing the MODULE_LICENSE() statement is not the
first file listed in $mod_source_files. Fix this by encasing
$mod_source_files in quotes so that the entirety of the string is
treated as a single argument and can be referred to as $2.
In addition, put quotes in the variable assignment of mod_source_files
to prevent any shell interpretation and field splitting.
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
Diffstat (limited to 'scripts/Makefile.package')
0 files changed, 0 insertions, 0 deletions