[PATCH] powertop: re-use string (~ -36)
Marek Polacek
mmpolacek at gmail.com
Tue Nov 2 23:29:52 UTC 2010
Signed-off-by: Marek Polacek <mmpolacek at gmail.com>
---
procps/powertop.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/procps/powertop.c b/procps/powertop.c
index 77b071f..b0bbe7d 100644
--- a/procps/powertop.c
+++ b/procps/powertop.c
@@ -548,6 +548,7 @@ static NOINLINE void print_intel_cstates(void)
struct dirent *d;
int i;
unsigned eax, ebx, ecx, edx;
+ static const char *support_str = "Your %s reports these C-states: ";
cpudir = opendir("/sys/devices/system/cpu");
if (!cpudir)
@@ -616,7 +617,7 @@ static NOINLINE void print_intel_cstates(void)
if (!edx || !(ecx & 1))
return;
- printf("Your CPU supports the following C-states: ");
+ printf(support_str, "CPU");
i = 0;
while (edx) {
if (edx & 7)
@@ -627,7 +628,7 @@ static NOINLINE void print_intel_cstates(void)
bb_putchar('\n');
/* Print BIOS C-States */
- printf("Your BIOS reports the following C-states: ");
+ printf(support_str, "BIOS");
for (i = 0; i < ARRAY_SIZE(bios_table); i++)
if (bios_table[i])
printf("C%u ", i);
--
1.7.3.2
More information about the busybox
mailing list