Skip to content

Commit

Permalink
kheaders: remove meaningless -R option of 'ls'
Browse files Browse the repository at this point in the history
The -R option of 'ls' is supposed to be used for directories.

   -R, --recursive
          list subdirectories recursively

Since 'find ... -type f' only matches to regular files, we do not
expect directories passed to the 'ls' command here.

Giving -R is harmless at least, but unneeded.

Signed-off-by: Masahiro Yamada <[email protected]>
Reviewed-by: Joel Fernandes (Google) <[email protected]>
  • Loading branch information
masahir0y committed Jul 9, 2019
1 parent 1e21cbf commit b60b7c2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/gen_kheaders.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ arch/$SRCARCH/include/
# Uncomment it for debugging.
# if [ ! -f /tmp/iter ]; then iter=1; echo 1 > /tmp/iter;
# else iter=$(($(cat /tmp/iter) + 1)); echo $iter > /tmp/iter; fi
# find $src_file_list -type f | xargs ls -lR > /tmp/src-ls-$iter
# find $obj_file_list -type f | xargs ls -lR > /tmp/obj-ls-$iter
# find $src_file_list -type f | xargs ls -l > /tmp/src-ls-$iter
# find $obj_file_list -type f | xargs ls -l > /tmp/obj-ls-$iter

# include/generated/compile.h is ignored because it is touched even when none
# of the source files changed. This causes pointless regeneration, so let us
Expand All @@ -46,15 +46,15 @@ src_files_md5="$(find $src_file_list -type f |
grep -v "include/config/auto.conf" |
grep -v "include/config/auto.conf.cmd" |
grep -v "include/config/tristate.conf" |
xargs ls -lR | md5sum | cut -d ' ' -f1)"
xargs ls -l | md5sum | cut -d ' ' -f1)"
popd > /dev/null
obj_files_md5="$(find $obj_file_list -type f |
grep -v "include/generated/compile.h" |
grep -v "include/generated/autoconf.h" |
grep -v "include/config/auto.conf" |
grep -v "include/config/auto.conf.cmd" |
grep -v "include/config/tristate.conf" |
xargs ls -lR | md5sum | cut -d ' ' -f1)"
xargs ls -l | md5sum | cut -d ' ' -f1)"

if [ -f $tarfile ]; then tarfile_md5="$(md5sum $tarfile | cut -d ' ' -f1)"; fi
if [ -f kernel/kheaders.md5 ] &&
Expand Down

0 comments on commit b60b7c2

Please sign in to comment.