diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-15 08:29:22 +0000 |
commit | c7bda1ce659294d6e22c06e087f6f265983c7578 (patch) | |
tree | 4c6d2217f4d8306c59cf1096f8664e1cfd167213 /procps | |
parent | 8854004b41065b3d081af7f3df13a100b0c8bfbe (diff) | |
download | busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.gz busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.tar.bz2 busybox-w32-c7bda1ce659294d6e22c06e087f6f265983c7578.zip |
Remove trailing whitespace. Update copyright to include 2004.
Diffstat (limited to 'procps')
-rw-r--r-- | procps/Makefile | 2 | ||||
-rw-r--r-- | procps/Makefile.in | 2 | ||||
-rw-r--r-- | procps/free.c | 8 | ||||
-rw-r--r-- | procps/kill.c | 2 | ||||
-rw-r--r-- | procps/pidof.c | 2 | ||||
-rw-r--r-- | procps/ps.c | 2 | ||||
-rw-r--r-- | procps/renice.c | 8 | ||||
-rw-r--r-- | procps/sysctl.c | 10 | ||||
-rw-r--r-- | procps/top.c | 20 | ||||
-rw-r--r-- | procps/uptime.c | 12 |
10 files changed, 34 insertions, 34 deletions
diff --git a/procps/Makefile b/procps/Makefile index 3751f79dd..0238f7ebb 100644 --- a/procps/Makefile +++ b/procps/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/procps/Makefile.in b/procps/Makefile.in index 723dd9ffb..1c2e00f7b 100644 --- a/procps/Makefile.in +++ b/procps/Makefile.in | |||
@@ -1,6 +1,6 @@ | |||
1 | # Makefile for busybox | 1 | # Makefile for busybox |
2 | # | 2 | # |
3 | # Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 3 | # Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
4 | # | 4 | # |
5 | # This program is free software; you can redistribute it and/or modify | 5 | # This program is free software; you can redistribute it and/or modify |
6 | # it under the terms of the GNU General Public License as published by | 6 | # it under the terms of the GNU General Public License as published by |
diff --git a/procps/free.c b/procps/free.c index dbc606c94..4fb047d48 100644 --- a/procps/free.c +++ b/procps/free.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Mini free implementation for busybox | 3 | * Mini free implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -64,11 +64,11 @@ extern int free_main(int argc, char **argv) | |||
64 | if (argc > 1 && **(argv + 1) == '-') | 64 | if (argc > 1 && **(argv + 1) == '-') |
65 | bb_show_usage(); | 65 | bb_show_usage(); |
66 | 66 | ||
67 | printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", | 67 | printf("%6s%13s%13s%13s%13s%13s\n", "", "total", "used", "free", |
68 | "shared", "buffers"); | 68 | "shared", "buffers"); |
69 | 69 | ||
70 | printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram, | 70 | printf("%6s%13ld%13ld%13ld%13ld%13ld\n", "Mem:", info.totalram, |
71 | info.totalram-info.freeram, info.freeram, | 71 | info.totalram-info.freeram, info.freeram, |
72 | info.sharedram, info.bufferram); | 72 | info.sharedram, info.bufferram); |
73 | 73 | ||
74 | #ifndef __uClinux__ | 74 | #ifndef __uClinux__ |
diff --git a/procps/kill.c b/procps/kill.c index 22bb98a12..a07855e79 100644 --- a/procps/kill.c +++ b/procps/kill.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * Mini kill/killall implementation for busybox | 3 | * Mini kill/killall implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. | 5 | * Copyright (C) 1995, 1996 by Bruce Perens <bruce@pixar.com>. |
6 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 6 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
diff --git a/procps/pidof.c b/procps/pidof.c index 2fe8ecd25..413864a37 100644 --- a/procps/pidof.c +++ b/procps/pidof.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * pidof implementation for busybox | 3 | * pidof implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
diff --git a/procps/ps.c b/procps/ps.c index b9d15b861..0b603314d 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Mini ps implementation(s) for busybox | 3 | * Mini ps implementation(s) for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License as published by the Free | 8 | * under the terms of the GNU General Public License as published by the Free |
diff --git a/procps/renice.c b/procps/renice.c index a81156eea..a6f0820df 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
@@ -31,17 +31,17 @@ | |||
31 | extern int renice_main(int argc, char **argv) | 31 | extern int renice_main(int argc, char **argv) |
32 | { | 32 | { |
33 | int prio, status = EXIT_SUCCESS; | 33 | int prio, status = EXIT_SUCCESS; |
34 | 34 | ||
35 | if (argc < 3) bb_show_usage(); | 35 | if (argc < 3) bb_show_usage(); |
36 | 36 | ||
37 | prio = atoi(*++argv); | 37 | prio = atoi(*++argv); |
38 | if (prio > 20) prio = 20; | 38 | if (prio > 20) prio = 20; |
39 | if (prio < -20) prio = -20; | 39 | if (prio < -20) prio = -20; |
40 | 40 | ||
41 | while (*++argv) { | 41 | while (*++argv) { |
42 | int ps = atoi(*argv); | 42 | int ps = atoi(*argv); |
43 | int oldp = getpriority(PRIO_PROCESS, ps); | 43 | int oldp = getpriority(PRIO_PROCESS, ps); |
44 | 44 | ||
45 | if (setpriority(PRIO_PROCESS, ps, prio) == 0) { | 45 | if (setpriority(PRIO_PROCESS, ps, prio) == 0) { |
46 | printf("%d: old priority %d, new priority %d\n", ps, oldp, prio ); | 46 | printf("%d: old priority %d, new priority %d\n", ps, oldp, prio ); |
47 | } else { | 47 | } else { |
diff --git a/procps/sysctl.c b/procps/sysctl.c index ee883e163..359dcc041 100644 --- a/procps/sysctl.c +++ b/procps/sysctl.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * - added -p <preload> to preload values from a file | 17 | * - added -p <preload> to preload values from a file |
18 | * v1.01.1 | 18 | * v1.01.1 |
19 | * - busybox applet aware by <solar@gentoo.org> | 19 | * - busybox applet aware by <solar@gentoo.org> |
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <stdio.h> | 23 | #include <stdio.h> |
@@ -70,7 +70,7 @@ static void dwrite_str(int fd, const char *buf) | |||
70 | } | 70 | } |
71 | 71 | ||
72 | /* | 72 | /* |
73 | * sysctl_main()... | 73 | * sysctl_main()... |
74 | */ | 74 | */ |
75 | int sysctl_main(int argc, char **argv) | 75 | int sysctl_main(int argc, char **argv) |
76 | { | 76 | { |
@@ -126,7 +126,7 @@ int sysctl_main(int argc, char **argv) | |||
126 | 126 | ||
127 | 127 | ||
128 | /* | 128 | /* |
129 | * sysctl_preload_file | 129 | * sysctl_preload_file |
130 | * preload the sysctl's from a conf file | 130 | * preload the sysctl's from a conf file |
131 | * - we parse the file and then reform it (strip out whitespace) | 131 | * - we parse the file and then reform it (strip out whitespace) |
132 | */ | 132 | */ |
@@ -250,7 +250,7 @@ int sysctl_write_setting(const char *setting, int output) | |||
250 | 250 | ||
251 | 251 | ||
252 | /* | 252 | /* |
253 | * Read a sysctl setting | 253 | * Read a sysctl setting |
254 | * | 254 | * |
255 | */ | 255 | */ |
256 | int sysctl_read_setting(const char *setting, int output) | 256 | int sysctl_read_setting(const char *setting, int output) |
@@ -304,7 +304,7 @@ int sysctl_read_setting(const char *setting, int output) | |||
304 | 304 | ||
305 | 305 | ||
306 | /* | 306 | /* |
307 | * Display all the sysctl settings | 307 | * Display all the sysctl settings |
308 | * | 308 | * |
309 | */ | 309 | */ |
310 | int sysctl_display_all(const char *path, int output, int show_table) | 310 | int sysctl_display_all(const char *path, int output, int show_table) |
diff --git a/procps/top.c b/procps/top.c index 64b3c0732..f619f6923 100644 --- a/procps/top.c +++ b/procps/top.c | |||
@@ -7,11 +7,11 @@ | |||
7 | * This reads the PIDs of all processes and their status and shows | 7 | * This reads the PIDs of all processes and their status and shows |
8 | * the status of processes (first ones that fit to screen) at given | 8 | * the status of processes (first ones that fit to screen) at given |
9 | * intervals. | 9 | * intervals. |
10 | * | 10 | * |
11 | * NOTES: | 11 | * NOTES: |
12 | * - At startup this changes to /proc, all the reads are then | 12 | * - At startup this changes to /proc, all the reads are then |
13 | * relative to that. | 13 | * relative to that. |
14 | * | 14 | * |
15 | * (C) Eero Tamminen <oak at welho dot com> | 15 | * (C) Eero Tamminen <oak at welho dot com> |
16 | * | 16 | * |
17 | * Rewroted by Vladimir Oleynik (C) 2002 <dzo@simtreas.ru> | 17 | * Rewroted by Vladimir Oleynik (C) 2002 <dzo@simtreas.ru> |
@@ -332,7 +332,7 @@ static unsigned long display_generic(void) | |||
332 | fscanf(fp, "Mem: %lu %lu %lu %lu %lu %lu", | 332 | fscanf(fp, "Mem: %lu %lu %lu %lu %lu %lu", |
333 | &total, &used, &mfree, &shared, &buffers, &cached); | 333 | &total, &used, &mfree, &shared, &buffers, &cached); |
334 | } else { | 334 | } else { |
335 | /* | 335 | /* |
336 | * Revert to manual parsing, which incidentally already has the | 336 | * Revert to manual parsing, which incidentally already has the |
337 | * sizes in kilobytes. This should be safe for both 2.4 and | 337 | * sizes in kilobytes. This should be safe for both 2.4 and |
338 | * 2.6. | 338 | * 2.6. |
@@ -341,7 +341,7 @@ static unsigned long display_generic(void) | |||
341 | 341 | ||
342 | fscanf(fp, "MemFree: %lu %s\n", &mfree, buf); | 342 | fscanf(fp, "MemFree: %lu %s\n", &mfree, buf); |
343 | 343 | ||
344 | /* | 344 | /* |
345 | * MemShared: is no longer present in 2.6. Report this as 0, | 345 | * MemShared: is no longer present in 2.6. Report this as 0, |
346 | * to maintain consistent behavior with normal procps. | 346 | * to maintain consistent behavior with normal procps. |
347 | */ | 347 | */ |
@@ -354,7 +354,7 @@ static unsigned long display_generic(void) | |||
354 | used = total - mfree; | 354 | used = total - mfree; |
355 | } | 355 | } |
356 | fclose(fp); | 356 | fclose(fp); |
357 | 357 | ||
358 | /* read load average */ | 358 | /* read load average */ |
359 | fp = bb_xfopen("loadavg", "r"); | 359 | fp = bb_xfopen("loadavg", "r"); |
360 | if (fscanf(fp, "%f %f %f", &avg1, &avg2, &avg3) != 3) { | 360 | if (fscanf(fp, "%f %f %f", &avg1, &avg2, &avg3) != 3) { |
@@ -371,7 +371,7 @@ static unsigned long display_generic(void) | |||
371 | cached /= 1024; | 371 | cached /= 1024; |
372 | total /= 1024; | 372 | total /= 1024; |
373 | } | 373 | } |
374 | 374 | ||
375 | /* output memory info and load average */ | 375 | /* output memory info and load average */ |
376 | /* clear screen & go to top */ | 376 | /* clear screen & go to top */ |
377 | printf("\e[H\e[J" "Mem: " | 377 | printf("\e[H\e[J" "Mem: " |
@@ -390,7 +390,7 @@ static void display_status(int count, int col) | |||
390 | procps_status_t *s = top; | 390 | procps_status_t *s = top; |
391 | char rss_str_buf[8]; | 391 | char rss_str_buf[8]; |
392 | unsigned long total_memory = display_generic(); | 392 | unsigned long total_memory = display_generic(); |
393 | 393 | ||
394 | #ifdef FEATURE_CPU_USAGE_PERCENTAGE | 394 | #ifdef FEATURE_CPU_USAGE_PERCENTAGE |
395 | /* what info of the processes is shown */ | 395 | /* what info of the processes is shown */ |
396 | printf("\n\e[7m PID USER STATUS RSS PPID %%CPU %%MEM COMMAND\e[0m\n"); | 396 | printf("\n\e[7m PID USER STATUS RSS PPID %%CPU %%MEM COMMAND\e[0m\n"); |
@@ -404,7 +404,7 @@ static void display_status(int count, int col) | |||
404 | 404 | ||
405 | pmem = 1000.0 * s->rss / total_memory; | 405 | pmem = 1000.0 * s->rss / total_memory; |
406 | if (pmem > 999) pmem = 999; | 406 | if (pmem > 999) pmem = 999; |
407 | 407 | ||
408 | if(s->rss > 10*1024) | 408 | if(s->rss > 10*1024) |
409 | sprintf(rss_str_buf, "%6ldM", s->rss/1024); | 409 | sprintf(rss_str_buf, "%6ldM", s->rss/1024); |
410 | else | 410 | else |
@@ -450,7 +450,7 @@ static void reset_term(void) | |||
450 | #endif | 450 | #endif |
451 | #endif /* CONFIG_FEATURE_CLEAN_UP */ | 451 | #endif /* CONFIG_FEATURE_CLEAN_UP */ |
452 | } | 452 | } |
453 | 453 | ||
454 | static void sig_catcher (int sig) | 454 | static void sig_catcher (int sig) |
455 | { | 455 | { |
456 | reset_term(); | 456 | reset_term(); |
@@ -609,6 +609,6 @@ int top_main(int argc, char **argv) | |||
609 | #endif /* CONFIG_FEATURE_USE_TERMIOS */ | 609 | #endif /* CONFIG_FEATURE_USE_TERMIOS */ |
610 | clearmems(); | 610 | clearmems(); |
611 | } | 611 | } |
612 | 612 | ||
613 | return EXIT_SUCCESS; | 613 | return EXIT_SUCCESS; |
614 | } | 614 | } |
diff --git a/procps/uptime.c b/procps/uptime.c index a974313d7..7e0735c44 100644 --- a/procps/uptime.c +++ b/procps/uptime.c | |||
@@ -2,7 +2,7 @@ | |||
2 | /* | 2 | /* |
3 | * Mini uptime implementation for busybox | 3 | * Mini uptime implementation for busybox |
4 | * | 4 | * |
5 | * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> | 5 | * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 8 | * it under the terms of the GNU General Public License as published by |
@@ -53,8 +53,8 @@ extern int uptime_main(int argc, char **argv) | |||
53 | 53 | ||
54 | sysinfo(&info); | 54 | sysinfo(&info); |
55 | 55 | ||
56 | printf(" %2d:%02d%s up ", | 56 | printf(" %2d:%02d%s up ", |
57 | current_time->tm_hour%12 ? current_time->tm_hour%12 : 12, | 57 | current_time->tm_hour%12 ? current_time->tm_hour%12 : 12, |
58 | current_time->tm_min, current_time->tm_hour > 11 ? "pm" : "am"); | 58 | current_time->tm_min, current_time->tm_hour > 11 ? "pm" : "am"); |
59 | updays = (int) info.uptime / (60*60*24); | 59 | updays = (int) info.uptime / (60*60*24); |
60 | if (updays) | 60 | if (updays) |
@@ -67,9 +67,9 @@ extern int uptime_main(int argc, char **argv) | |||
67 | else | 67 | else |
68 | printf("%d min, ", upminutes); | 68 | printf("%d min, ", upminutes); |
69 | 69 | ||
70 | printf("load average: %ld.%02ld, %ld.%02ld, %ld.%02ld\n", | 70 | printf("load average: %ld.%02ld, %ld.%02ld, %ld.%02ld\n", |
71 | LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]), | 71 | LOAD_INT(info.loads[0]), LOAD_FRAC(info.loads[0]), |
72 | LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]), | 72 | LOAD_INT(info.loads[1]), LOAD_FRAC(info.loads[1]), |
73 | LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2])); | 73 | LOAD_INT(info.loads[2]), LOAD_FRAC(info.loads[2])); |
74 | 74 | ||
75 | return EXIT_SUCCESS; | 75 | return EXIT_SUCCESS; |