maint: fix ioctls_sym.sh premature termination
When the list of headers do not fit into the command line, xargs splits it into several lists and then passes them to grep. If no headers from a list match the grep pattern, grep exits with a non-zero status that causes xargs to exit with a non-zero status, too. * maint/ioctls_sym.sh: Use "find -exec +" instead of xargs, ignore its exit status.
This commit is contained in:
parent
663b4f8273
commit
16f1b5ca72
@ -75,9 +75,10 @@ tmpdir="$(mktemp -dt "$me.XXXXXX")"
|
||||
# list interesting files in $inc_dir.
|
||||
cd "$inc_dir"
|
||||
inc_dir="$(pwd -P)"
|
||||
find . -type f -name '*.h' -print0 |
|
||||
xargs -r0 grep -l "$r_value" -- > "$tmpdir"/headers1.list ||
|
||||
exit 0
|
||||
find . -type f -name '*.h' -exec grep -l "$r_value" -- '{}' + \
|
||||
> "$tmpdir"/headers1.list ||:
|
||||
[ -s "$tmpdir"/headers1.list ] || exit 0
|
||||
|
||||
cd - > /dev/null
|
||||
sed 's|^\./\(uapi/\)\?||' < "$tmpdir"/headers1.list > "$tmpdir"/headers.list
|
||||
LC_COLLATE=C sort -u -o "$tmpdir"/headers.list "$tmpdir"/headers.list
|
||||
|
Loading…
Reference in New Issue
Block a user