scummvm random work
[patches.git] / uclinux-sysutils-cleanup.patch
CommitLineData
5e993f12 1Index: user/sysutils/df.c
2===================================================================
3RCS file: /var/cvs/uClinux-dist/user/sysutils/df.c,v
4retrieving revision 1.1.1.1
5diff -u -p -r1.1.1.1 df.c
6--- user/sysutils/df.c 19 Sep 2002 04:26:06 -0000 1.1.1.1
7+++ user/sysutils/df.c 7 Jan 2007 08:36:51 -0000
8@@ -9,22 +9,15 @@
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12-#include <linux/autoconf.h>
13-
14 #include <stdio.h>
15 #include <fcntl.h>
16 #include <sys/types.h>
17 #include <sys/vfs.h>
18-
19+#include <stdlib.h>
20+#include <string.h>
21 #include <sys/stat.h>
22-#include <dirent.h>
23-#include <pwd.h>
24-#include <grp.h>
25 #include <time.h>
26-#include <linux/major.h>
27-#include <linux/types.h>
28 #include <sys/time.h>
29-#include <asm/param.h>
30 #include <errno.h>
31
32 int
33Index: user/sysutils/free.c
34===================================================================
35RCS file: /var/cvs/uClinux-dist/user/sysutils/free.c,v
36retrieving revision 1.1.1.1
37diff -u -p -r1.1.1.1 free.c
38--- user/sysutils/free.c 19 Sep 2002 04:26:06 -0000 1.1.1.1
39+++ user/sysutils/free.c 7 Jan 2007 08:36:51 -0000
40@@ -10,17 +10,9 @@
41 * (at your option) any later version.
42 */
43
44-#include <linux/autoconf.h>
45-
46 #include <stdio.h>
47+#include <stdlib.h>
48 #include <fcntl.h>
49-#include <sys/types.h>
50-
51-#include <sys/stat.h>
52-#include <dirent.h>
53-#include <pwd.h>
54-#include <grp.h>
55-#include <time.h>
56
57 char buf[256];
58
59Index: user/sysutils/hostname.c
60===================================================================
61RCS file: /var/cvs/uClinux-dist/user/sysutils/hostname.c,v
62retrieving revision 1.1.1.1
63diff -u -p -r1.1.1.1 hostname.c
64--- user/sysutils/hostname.c 19 Sep 2002 04:26:06 -0000 1.1.1.1
65+++ user/sysutils/hostname.c 7 Jan 2007 08:36:51 -0000
66@@ -3,6 +3,8 @@
67 #include <sys/types.h>
68 #include <sys/param.h>
69 #include <stdio.h>
70+#include <stdlib.h>
71+#include <string.h>
72 #include <unistd.h>
73
74 int main(int argc, char *argv[])
75Index: user/sysutils/ps.c
76===================================================================
77RCS file: /var/cvs/uClinux-dist/user/sysutils/ps.c,v
78retrieving revision 1.1.1.2
79diff -u -p -r1.1.1.2 ps.c
80--- user/sysutils/ps.c 10 Aug 2005 00:23:03 -0000 1.1.1.2
81+++ user/sysutils/ps.c 7 Jan 2007 08:36:51 -0000
82@@ -10,13 +10,12 @@
83 * (at your option) any later version.
84 */
85
86-#include <linux/autoconf.h>
87-
88 #include <stdio.h>
89 #include <fcntl.h>
90 #include <stdlib.h>
91 #include <sys/types.h>
92 #include <string.h>
93+#include <unistd.h>
94 #include <sys/stat.h>
95 #include <dirent.h>
96 #include <pwd.h>
97@@ -64,7 +63,6 @@ main(argc, argv)
98 {
99 int i;
100 int h;
101- int max;
102 FILE * f;
103 DIR * d;
104 unsigned long bytes, sbytes;
105@@ -73,7 +71,6 @@ main(argc, argv)
106 int l;
107 time_t time_now;
108 long uptime_secs;
109- float idle_secs;
110 float seconds, start, total_time;
111 int utime, stime, start_time;
112 int pcpu;
113@@ -114,9 +111,9 @@ main(argc, argv)
114
115 d = opendir("/proc");
116 if (!d)
117- return;
118+ return 1;
119
120- while (de = readdir(d)) {
121+ while ((de = readdir(d)) != NULL) {
122
123
124 for(i=0;i<strlen(de->d_name);i++)
125Index: user/sysutils/reboot.c
126===================================================================
127RCS file: /var/cvs/uClinux-dist/user/sysutils/reboot.c,v
128retrieving revision 1.1.1.1
129diff -u -p -r1.1.1.1 reboot.c
130--- user/sysutils/reboot.c 19 Sep 2002 04:26:06 -0000 1.1.1.1
131+++ user/sysutils/reboot.c 7 Jan 2007 08:36:51 -0000
132@@ -12,10 +12,10 @@
133 * AUG/99 -- added delay option to reboot
134 */
135
136-#include <linux/autoconf.h>
137-
138+#include <stdio.h>
139 #include <string.h>
140 #include <stdlib.h>
141+#include <unistd.h>
142 #include <fcntl.h>
143 #include <sys/types.h>
144
145Index: user/sysutils/shutdown.c
146===================================================================
147RCS file: /var/cvs/uClinux-dist/user/sysutils/shutdown.c,v
148retrieving revision 1.1.1.1
149diff -u -p -r1.1.1.1 shutdown.c
150--- user/sysutils/shutdown.c 19 Sep 2002 04:26:06 -0000 1.1.1.1
151+++ user/sysutils/shutdown.c 7 Jan 2007 08:36:51 -0000
152@@ -10,8 +10,10 @@
153 * (at your option) any later version.
154 */
155
156-#include <linux/autoconf.h>
157
158+#include <stdio.h>
159+#include <stdlib.h>
160+#include <unistd.h>
161 #include <string.h>
162 #include <fcntl.h>
163 #include <sys/types.h>