summaryrefslogtreecommitdiffstats
path: root/package/iostat/iostat-cpunum.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2010-07-22 12:50:54 -0300
committerPeter Korsgaard <jacmet@sunsite.dk>2010-07-29 17:29:01 +0200
commitee77963588b09babfd71befb0b5eb9fd1e776bbc (patch)
tree4e2e4c56fcf6bfab0cfaf16ca9dd8cdc24dfc61a /package/iostat/iostat-cpunum.patch
parentebf21166b7abc35f4faa4bded5c919641a282339 (diff)
downloadbuildroot-novena-ee77963588b09babfd71befb0b5eb9fd1e776bbc.tar.gz
buildroot-novena-ee77963588b09babfd71befb0b5eb9fd1e776bbc.zip
iostat: migrate to gentargets
Also make the cpu counting routine more reliable (for ARM it's "Processor" in cpuinfo rather than "processor"). Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/iostat/iostat-cpunum.patch')
-rw-r--r--package/iostat/iostat-cpunum.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/iostat/iostat-cpunum.patch b/package/iostat/iostat-cpunum.patch
new file mode 100644
index 000000000..0e75dbf71
--- /dev/null
+++ b/package/iostat/iostat-cpunum.patch
@@ -0,0 +1,27 @@
+From bf646965f75cdad77a45fa3b0046e093b202b2ce Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Thu, 22 Jul 2010 12:42:10 -0300
+Subject: [PATCH] Make cpu number counter more reliable
+
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ iostat.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/iostat.c b/iostat.c
+index 13e2af7..5d74085 100644
+--- a/iostat.c
++++ b/iostat.c
+@@ -140,7 +140,7 @@ void get_number_of_cpus()
+
+ handle_error("Can't open /proc/cpuinfo", !ncpufp);
+ while (fgets(buffer, sizeof(buffer), ncpufp)) {
+- if (!strncmp(buffer, "processor\t:", 11))
++ if (!strncasecmp(buffer, "processor\t", 10))
+ ncpu++;
+ }
+ fclose(ncpufp);
+--
+1.7.1
+