[Pkg-wmaker-commits] [wmcube] 32/67: debian/patches: (30_bts-386850_fix_smp.patch) Convert to quilt, update for new upstream version, and add DEP3 header.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Tue Aug 25 03:22:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmcube.
commit cfd7e5d497280c21e77b1cbcfda79491e9980314
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Jan 12 00:21:17 2015 -0600
debian/patches: (30_bts-386850_fix_smp.patch) Convert to quilt, update for
new upstream version, and add DEP3 header.
---
debian/patches/30_bts-386850_fix_smp.patch | 39 ++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 40 insertions(+)
diff --git a/debian/patches/30_bts-386850_fix_smp.patch b/debian/patches/30_bts-386850_fix_smp.patch
new file mode 100644
index 0000000..ab7aed0
--- /dev/null
+++ b/debian/patches/30_bts-386850_fix_smp.patch
@@ -0,0 +1,39 @@
+Description: Fix smp support, reading all the fields in /proc/stat.
+Author: Sandro Tosi <matrixhasu at gmail.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=386850
+Last-Update: 2015-01-12
+
+--- a/wmcube/wmcube.c
++++ b/wmcube/wmcube.c
+@@ -1118,6 +1118,7 @@
+ int i;
+ char cpuid[6];
+ char check_cpu[6];
++ char tmp[32];
+
+ sprintf(check_cpu, "cpu%d", which_cpu);
+
+@@ -1130,7 +1131,7 @@
+ return 0;
+
+ for (i = -2; i < which_cpu; i++) {
+- fscanf(fp, "%s", cpuid);
++ fscanf(fp, "%5s %31s %31s %31s %31s %31s %31s %31s %31s", cpuid, tmp, tmp, tmp, tmp, tmp, tmp, tmp, tmp);
+ }
+
+ if (strcmp(check_cpu,cpuid) != 0) {
+@@ -1146,12 +1147,13 @@
+ static int previous_total = 0, previous_used = 0;
+ char cpuid[6];
+ int cpu,nice,system,idle;
++ char tmp[32];
+ FILE *fp;
+
+ fp = fopen("/proc/stat","rt");
+
+ for (i = -2; i < which_cpu; i++) {
+- fscanf(fp,"%s %d %d %d %d",cpuid,&cpu,&nice,&system,&idle);
++ fscanf(fp,"%5s %d %d %d %d %31s %31s %31s %31s", cpuid, &cpu, &nice, &system, &idle, tmp, tmp, tmp, tmp);
+ }
+
+ fclose(fp);
diff --git a/debian/patches/series b/debian/patches/series
index 742655f..64b0900 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+30_bts-386850_fix_smp.patch
update_makefile.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcube.git
More information about the Pkg-wmaker-commits
mailing list