[PATCH 1/9] Replace pipes with a binary for cpu core count

Bhaskar Chowdhury posted 9 patches 3 months, 2 weeks ago
[PATCH 1/9] Replace pipes with a binary for cpu core count
Posted by Bhaskar Chowdhury 3 months, 2 weeks ago
Change the piped series with nproc binary,hopefully for better readability

Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
 smatch_scripts/build_generic_data.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/smatch_scripts/build_generic_data.sh b/smatch_scripts/build_generic_data.sh
index b18ceff8320c..c88ad3fcfc0f 100755
--- a/smatch_scripts/build_generic_data.sh
+++ b/smatch_scripts/build_generic_data.sh
@@ -3,7 +3,7 @@
 # This is a generic script to parse --info output.  For the kernel, don't use
 # this script, use build_kernel_data.sh instead.

-NR_CPU=$(cat /proc/cpuinfo | grep ^processor | wc -l)
+NR_CPU=$(nproc)
 SCRIPT_DIR=$(dirname $0)
 DATA_DIR=smatch_data
 PROJECT=smatch_generic
--
2.46.3