X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=procps%2Fpowertop.c;h=ce85f4191e0f605dfd67e1f00f072956201a4b92;hb=2b1559056cf32c42675ecd937796e1455bcb5c2c;hp=18affacdd790041a5da0df75014d991f6e2f8593;hpb=8dff01d06a7ebd7330e3a1dd1ba47b3c74ee7dfb;p=oweals%2Fbusybox.git diff --git a/procps/powertop.c b/procps/powertop.c index 18affacdd..ce85f4191 100644 --- a/procps/powertop.c +++ b/procps/powertop.c @@ -360,7 +360,7 @@ static void process_irq_counts(void) } name = p; - strchrnul(name, '\n')[0] = '\0'; + chomp(p); /* Save description of the interrupt */ if (nr >= 20000) sprintf(irq_desc, " : %s", name); @@ -470,7 +470,7 @@ static NOINLINE int process_timer_stats(void) process = idx < 2 ? "[kernel module]" : ""; } - strchrnul(p, '\n')[0] = '\0'; + chomp(p); // 46D\01136\0kondemand/1\0do_dbs_timer (delayed_work_timer_fn) // ^ ^ ^ @@ -591,7 +591,7 @@ static NOINLINE void print_intel_cstates(void) if (!edx || !(ecx & 1)) return; - printf("Your CPU supports the following C-states: "); + printf("Your %s the following C-states: ", "CPU supports"); i = 0; while (edx) { if (edx & 7) @@ -602,7 +602,7 @@ static NOINLINE void print_intel_cstates(void) bb_putchar('\n'); /* Print BIOS C-States */ - printf("Your BIOS reports the following C-states: "); + printf("Your %s the following C-states: ", "BIOS reports"); for (i = 0; i < ARRAY_SIZE(bios_table); i++) if (bios_table[i]) printf("C%u ", i); @@ -704,7 +704,7 @@ int powertop_main(int UNUSED_PARAM argc, char UNUSED_PARAM **argv) /* Get number of CPUs */ G.total_cpus = get_cpu_count(); - printf("Collecting data for "DEFAULT_SLEEP_STR" seconds\n"); + puts("Collecting data for "DEFAULT_SLEEP_STR" seconds"); #if ENABLE_FEATURE_USE_TERMIOS tcgetattr(0, (void *)&G.init_settings);