Skip to content
Snippets Groups Projects
  1. Jun 08, 2022
  2. May 01, 2021
  3. Dec 12, 2020
  4. Jul 10, 2020
  5. Nov 11, 2019
  6. Nov 05, 2019
    • Jessica Yu's avatar
      scripts/nsdeps: make sure to pass all module source files to spatch · 57baec7b
      Jessica Yu authored
      
      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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarMatthias Maennich <maennich@google.com>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      57baec7b
  7. Oct 23, 2019
    • Jessica Yu's avatar
      scripts/nsdeps: use alternative sed delimiter · 09684950
      Jessica Yu authored
      
      When doing an out of tree build with O=, the nsdeps script constructs
      the absolute pathname of the module source file so that it can insert
      MODULE_IMPORT_NS statements in the right place. However, ${srctree}
      contains an unescaped path to the source tree, which, when used in a sed
      substitution, makes sed complain:
      
      ++ sed 's/[^ ]* *//home/jeyu/jeyu-linux\/&/g'
      sed: -e expression #1, char 12: unknown option to `s'
      
      The sed substitution command 's' ends prematurely with the forward
      slashes in the pathname, and sed errors out when it encounters the 'h',
      which is an invalid sed substitution option. To avoid escaping forward
      slashes ${srctree}, we can use '|' as an alternative delimiter for
      sed instead to avoid this error.
      
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarMatthias Maennich <maennich@google.com>
      Tested-by: default avatarMatthias Maennich <maennich@google.com>
      Signed-off-by: default avatarJessica Yu <jeyu@kernel.org>
      09684950
  8. Oct 07, 2019
  9. Sep 10, 2019
Loading