diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-28 18:57:19 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-28 18:57:19 +0200 |
| commit | e4dcba1c103dc28e927e004791e331aaf604383d (patch) | |
| tree | a18094ecc54fcea2cb523a802e0c414c3e6f85bf /procps | |
| parent | 776509544123c68bbc128c0fdb2f699062d294cf (diff) | |
| download | busybox-w32-e4dcba1c103dc28e927e004791e331aaf604383d.tar.gz busybox-w32-e4dcba1c103dc28e927e004791e331aaf604383d.tar.bz2 busybox-w32-e4dcba1c103dc28e927e004791e331aaf604383d.zip | |
*: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
| -rw-r--r-- | procps/powertop.c | 18 | ||||
| -rw-r--r-- | procps/renice.c | 6 |
2 files changed, 13 insertions, 11 deletions
diff --git a/procps/powertop.c b/procps/powertop.c index 5e028f074..250da817b 100644 --- a/procps/powertop.c +++ b/procps/powertop.c | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | /* Frequency of the ACPI timer */ | 40 | /* Frequency of the ACPI timer */ |
| 41 | #define FREQ_ACPI 3579.545 | 41 | #define FREQ_ACPI 3579.545 |
| 42 | #define FREQ_ACPI_1000 3579545 | 42 | #define FREQ_ACPI_1000 3579545 |
| 43 | 43 | ||
| 44 | /* Max filename length of entry in /sys/devices subsystem */ | 44 | /* Max filename length of entry in /sys/devices subsystem */ |
| 45 | #define BIG_SYSNAME_LEN 16 | 45 | #define BIG_SYSNAME_LEN 16 |
| @@ -115,8 +115,8 @@ static int write_str_to_file(const char *fname, const char *str) | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | /* Make it more readable */ | 117 | /* Make it more readable */ |
| 118 | #define start_timer() write_str_to_file("/proc/timer_stats", "1\n") | 118 | #define start_timer() write_str_to_file("/proc/timer_stats", "1\n") |
| 119 | #define stop_timer() write_str_to_file("/proc/timer_stats", "0\n") | 119 | #define stop_timer() write_str_to_file("/proc/timer_stats", "0\n") |
| 120 | 120 | ||
| 121 | static NOINLINE void clear_lines(void) | 121 | static NOINLINE void clear_lines(void) |
| 122 | { | 122 | { |
| @@ -362,7 +362,7 @@ static void process_irq_counts(void) | |||
| 362 | } | 362 | } |
| 363 | /* 0: 143646045 153901007 IO-APIC-edge timer | 363 | /* 0: 143646045 153901007 IO-APIC-edge timer |
| 364 | * NMI: 1 2 Non-maskable interrupts | 364 | * NMI: 1 2 Non-maskable interrupts |
| 365 | * ^ | 365 | * ^ |
| 366 | */ | 366 | */ |
| 367 | if (nr < 20000) { | 367 | if (nr < 20000) { |
| 368 | /* Skip to the interrupt name, e.g. 'timer' */ | 368 | /* Skip to the interrupt name, e.g. 'timer' */ |
| @@ -539,9 +539,9 @@ static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, | |||
| 539 | } | 539 | } |
| 540 | #endif | 540 | #endif |
| 541 | 541 | ||
| 542 | #ifdef __i386__ | ||
| 542 | static NOINLINE void print_intel_cstates(void) | 543 | static NOINLINE void print_intel_cstates(void) |
| 543 | { | 544 | { |
| 544 | #ifdef __i386__ | ||
| 545 | int bios_table[8] = { 0 }; | 545 | int bios_table[8] = { 0 }; |
| 546 | int nbios = 0; | 546 | int nbios = 0; |
| 547 | DIR *cpudir; | 547 | DIR *cpudir; |
| @@ -628,13 +628,15 @@ static NOINLINE void print_intel_cstates(void) | |||
| 628 | 628 | ||
| 629 | /* Print BIOS C-States */ | 629 | /* Print BIOS C-States */ |
| 630 | printf("Your BIOS reports the following C-states: "); | 630 | printf("Your BIOS reports the following C-states: "); |
| 631 | for (i = 0; i < 8; i++) | 631 | for (i = 0; i < ARRAY_SIZE(bios_table); i++) |
| 632 | if (bios_table[i]) | 632 | if (bios_table[i]) |
| 633 | printf("C%u ", i); | 633 | printf("C%u ", i); |
| 634 | 634 | ||
| 635 | bb_putchar('\n'); | 635 | bb_putchar('\n'); |
| 636 | #endif | ||
| 637 | } | 636 | } |
| 637 | #else | ||
| 638 | # define print_intel_cstates(void) ((void)0) | ||
| 639 | #endif | ||
| 638 | 640 | ||
| 639 | static void show_timerstats(void) | 641 | static void show_timerstats(void) |
| 640 | { | 642 | { |
| @@ -817,7 +819,7 @@ int powertop_main(int UNUSED_PARAM argc, char UNUSED_PARAM **argv) | |||
| 817 | 819 | ||
| 818 | sprintf(cstate_lines[0], "Cn\t\t Avg residency\n"); | 820 | sprintf(cstate_lines[0], "Cn\t\t Avg residency\n"); |
| 819 | percentage = newticks * 100.0 / (G.total_cpus * DEFAULT_SLEEP * FREQ_ACPI_1000); | 821 | percentage = newticks * 100.0 / (G.total_cpus * DEFAULT_SLEEP * FREQ_ACPI_1000); |
| 820 | sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage); | 822 | sprintf(cstate_lines[1], "C0 (cpu running) (%4.1f%%)\n", percentage); |
| 821 | 823 | ||
| 822 | /* Compute values for individual C-states */ | 824 | /* Compute values for individual C-states */ |
| 823 | for (i = 0; i < MAX_CSTATE_COUNT; i++) { | 825 | for (i = 0; i < MAX_CSTATE_COUNT; i++) { |
diff --git a/procps/renice.c b/procps/renice.c index 0a73cbeeb..59194b5f4 100644 --- a/procps/renice.c +++ b/procps/renice.c | |||
| @@ -32,7 +32,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
| 32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; | 32 | static const char Xetpriority_msg[] ALIGN1 = "%cetpriority"; |
| 33 | 33 | ||
| 34 | int retval = EXIT_SUCCESS; | 34 | int retval = EXIT_SUCCESS; |
| 35 | int which = PRIO_PROCESS; /* Default 'which' value. */ | 35 | int which = PRIO_PROCESS; /* Default 'which' value. */ |
| 36 | int use_relative = 0; | 36 | int use_relative = 0; |
| 37 | int adjustment, new_priority; | 37 | int adjustment, new_priority; |
| 38 | unsigned who; | 38 | unsigned who; |
| @@ -57,7 +57,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
| 57 | arg += 2; | 57 | arg += 2; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | if (!arg) { /* No args? Then show usage. */ | 60 | if (!arg) { /* No args? Then show usage. */ |
| 61 | bb_show_usage(); | 61 | bb_show_usage(); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| @@ -100,7 +100,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv) | |||
| 100 | if (use_relative) { | 100 | if (use_relative) { |
| 101 | int old_priority; | 101 | int old_priority; |
| 102 | 102 | ||
| 103 | errno = 0; /* Needed for getpriority error detection. */ | 103 | errno = 0; /* Needed for getpriority error detection. */ |
| 104 | old_priority = getpriority(which, who); | 104 | old_priority = getpriority(which, who); |
| 105 | if (errno) { | 105 | if (errno) { |
| 106 | bb_perror_msg(Xetpriority_msg, 'g'); | 106 | bb_perror_msg(Xetpriority_msg, 'g'); |
