X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiostat%2F0001-cpunum.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fiostat%2F0001-cpunum.patch;h=0e75dbf71a230003ce426fa900bee36879ae7ed0;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/iostat/0001-cpunum.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/iostat/0001-cpunum.patch new file mode 100644 index 0000000..0e75dbf --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/iostat/0001-cpunum.patch @@ -0,0 +1,27 @@ +From bf646965f75cdad77a45fa3b0046e093b202b2ce Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Thu, 22 Jul 2010 12:42:10 -0300 +Subject: [PATCH] Make cpu number counter more reliable + + +Signed-off-by: Gustavo Zacarias +--- + 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 +