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.
# 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