Ticket #26454: patch-cpuinfo-tovid-init.in.diff
File patch-cpuinfo-tovid-init.in.diff, 885 bytes (added by danielb@…, 14 years ago) |
---|
-
src/tovid-init.in
old new 455 455 KERNEL=$(uname) 456 456 if test "$KERNEL" = "Linux"; then 457 457 # Linux should have /proc/cpuinfo 458 CPU_MODEL=$(awk -F ":" '/model name/ {print $2}' /proc/cpuinfo | head -n 1) 459 CPU_SPEED=$(awk 'BEGIN { IGNORECASE = 1 } /MHz/ { print $4 }' /proc/cpuinfo | head -n 1) 458 CPU_MODEL=$(sysctl -n -a machdep.cpu.brand_string) 459 CPU_SPEED=$(sysctl -n -a hw.cpufrequency) 460 CPU_SPEED=$(bc_math '$CPU_SPEED / 1000000000') 460 461 # Test for multiple CPUs. If they are available, try to use them. 461 if test $( grep "^processor" /proc/cpuinfo | wc -l) -ge "2"; then462 if test $(sysctl -n -a hw.activecpu) -ge "2"; then 462 463 MULTIPLE_CPUS=: 463 464 else 464 465 MULTIPLE_CPUS=false 465 466 fi 466 elif test "$KERNEL" = "Darwin"; then467 :468 467 fi 469 468 470 469