Gentoo Archives: gentoo-commits

From: "Bernard Cafarelli (voyageur)" <voyageur@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-plugins/wmhdplop/files: wmhdplop-0.9.9-64bit.patch
Date: Tue, 29 Jun 2010 09:54:01
Message-Id: 20100629095357.3D38F2C3ED@corvid.gentoo.org
1 voyageur 10/06/29 09:53:57
2
3 Added: wmhdplop-0.9.9-64bit.patch
4 Log:
5 Fix dockapp neeeding a restart after a long time, patch by Mikael Magnusson <mikachu@×××××.com> in bug #325615
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch
10
11 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-plugins/wmhdplop/files/wmhdplop-0.9.9-64bit.patch?rev=1.1&content-type=text/plain
13
14 Index: wmhdplop-0.9.9-64bit.patch
15 ===================================================================
16 diff -pudr wmhdplop-0.9.9/devnames.h wmhdplop-0.9.9-fixed/devnames.h
17 --- wmhdplop-0.9.9/devnames.h 2004-04-07 01:14:01.000000000 +0200
18 +++ wmhdplop-0.9.9-fixed/devnames.h 2010-06-25 21:56:10.662190796 +0200
19 @@ -9,7 +9,7 @@ typedef struct DiskList {
20 unsigned major, minor;
21 int hd_id, part_id; /* part_id = 0 for disks */
22 int enable_hddtemp;
23 - int nr, nw, touched_r, touched_w;
24 + long nr, nw, touched_r, touched_w;
25 struct DiskList *next;
26 } DiskList;
27
28 diff -pudr wmhdplop-0.9.9/procstat.c wmhdplop-0.9.9-fixed/procstat.c
29 --- wmhdplop-0.9.9/procstat.c 2007-04-20 11:12:16.000000000 +0200
30 +++ wmhdplop-0.9.9-fixed/procstat.c 2010-06-25 21:55:37.086191145 +0200
31 @@ -8,7 +8,7 @@
32 static ProcStats ps;
33 int use_proc_diskstats;
34
35 -void pstat_init(struct pstat *pst, int nslice, float update_interval) {
36 +void pstat_init(struct pstat *pst, long nslice, float update_interval) {
37 pst->nslice = nslice;
38 ALLOC_VEC(pst->slices, nslice);
39 pst->cur_slice = 0;
40 @@ -17,7 +17,7 @@ void pstat_init(struct pstat *pst, int n
41 }
42
43 float pstat_current(struct pstat *pst) {
44 - int idx = pst->cur_slice ? pst->cur_slice-1 : pst->nslice-1;
45 + long idx = pst->cur_slice ? pst->cur_slice-1 : pst->nslice-1;
46 return pst->slices[idx]/pst->update_interval;
47 }
48
49 @@ -101,13 +101,13 @@ void update_stats() {
50 if (!Prefs.debug_disk_rd) {
51 pstat_add(&ps.disk_read, nr);
52 } else {
53 - static int cntr = 0; cntr+=(rand()%30) == 0 ? Prefs.debug_disk_rd : 0;
54 + static long cntr = 0; cntr+=(rand()%30) == 0 ? Prefs.debug_disk_rd : 0;
55 pstat_add(&ps.disk_read, nr + cntr);
56 }
57 if (!Prefs.debug_disk_wr) {
58 pstat_add(&ps.disk_write, nw);
59 } else {
60 - static int cntw = 0; cntw+=(rand()%30) == 0 ? Prefs.debug_disk_wr : 0;
61 + static long cntw = 0; cntw+=(rand()%30) == 0 ? Prefs.debug_disk_wr : 0;
62 pstat_add(&ps.disk_write, nw + cntw);
63 }
64 readok = 2;
65 @@ -121,7 +121,7 @@ void update_stats() {
66 pstat_add(&ps.swap_in, nr);
67 pstat_add(&ps.swap_out, nw);
68 } else {
69 - static int cnt = 0; cnt+=Prefs.debug_swapio;
70 + static long cnt = 0; cnt+=Prefs.debug_swapio;
71 pstat_add(&ps.swap_in, nr + cnt);
72 pstat_add(&ps.swap_out, nw + cnt);
73 }
74 @@ -144,10 +144,10 @@ void init_stats(float update_interval) {
75 char s[512];
76 FILE *f;
77
78 - pstat_init(&ps.swap_in, (int)(0.5/update_interval)+1, update_interval);
79 - pstat_init(&ps.swap_out, (int)(0.5/update_interval)+1, update_interval);
80 - pstat_init(&ps.disk_read, (int)(0.5/update_interval)+1, update_interval);
81 - pstat_init(&ps.disk_write, (int)(0.5/update_interval)+1, update_interval);
82 + pstat_init(&ps.swap_in, (long)(0.5/update_interval)+1, update_interval);
83 + pstat_init(&ps.swap_out, (long)(0.5/update_interval)+1, update_interval);
84 + pstat_init(&ps.disk_read, (long)(0.5/update_interval)+1, update_interval);
85 + pstat_init(&ps.disk_write, (long)(0.5/update_interval)+1, update_interval);
86 f = fopen("/proc/swaps","r");
87 //if (!f) { perror("/proc/swaps"); exit(1); }
88 if (f) {
89 diff -pudr wmhdplop-0.9.9/procstat.h wmhdplop-0.9.9-fixed/procstat.h
90 --- wmhdplop-0.9.9/procstat.h 2004-03-14 12:07:15.000000000 +0100
91 +++ wmhdplop-0.9.9-fixed/procstat.h 2010-06-25 21:45:52.146334994 +0200
92 @@ -4,7 +4,7 @@
93
94 struct pstat {
95 unsigned long total;
96 - int nslice, cur_slice;
97 + long nslice, cur_slice;
98 unsigned long *slices;
99 float update_interval;
100 };
101 @@ -15,7 +15,7 @@ typedef struct {
102 struct pstat disk_read, disk_write;
103 } ProcStats;
104
105 -void pstat_init(struct pstat *pst, int nslice, float update_interval);
106 +void pstat_init(struct pstat *pst, long nslice, float update_interval);
107 float pstat_current(struct pstat *pst);
108 void pstat_add(struct pstat *pst, unsigned long v);
109 void pstat_advance(struct pstat *pst);