Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/procps/powertop.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/procps/powertop.c
r3232 r3621 361 361 362 362 name = p; 363 strchrnul(name, '\n')[0] = '\0';363 chomp(p); 364 364 /* Save description of the interrupt */ 365 365 if (nr >= 20000) … … 459 459 //} 460 460 461 if ( strncmp(func, "tick_nohz_", 10) == 0)462 continue; 463 if ( strncmp(func, "tick_setup_sched_timer", 20) == 0)461 if (is_prefixed_with(func, "tick_nohz_")) 462 continue; 463 if (is_prefixed_with(func, "tick_setup_sched_timer")) 464 464 continue; 465 465 //if (strcmp(process, "powertop") == 0) … … 471 471 } 472 472 473 strchrnul(p, '\n')[0] = '\0';473 chomp(p); 474 474 475 475 // 46D\01136\0kondemand/1\0do_dbs_timer (delayed_work_timer_fn) … … 592 592 return; 593 593 594 printf("Your CPU supports the following C-states:");594 printf("Your %s the following C-states: ", "CPU supports"); 595 595 i = 0; 596 596 while (edx) { … … 603 603 604 604 /* Print BIOS C-States */ 605 printf("Your BIOS reports the following C-states:");605 printf("Your %s the following C-states: ", "BIOS reports"); 606 606 for (i = 0; i < ARRAY_SIZE(bios_table); i++) 607 607 if (bios_table[i]) … … 628 628 char strbuf6[6]; 629 629 630 strbuf6[5] = '\0';631 630 puts("\nTop causes for wakeups:"); 632 631 for (i = 0; i < G.lines_cnt; i++) { … … 640 639 if (G.lines[i].disk_count) 641 640 c = 'D';*/ 642 smart_ulltoa5(G.lines[i].count, strbuf6, " KMGTPEZY") ;641 smart_ulltoa5(G.lines[i].count, strbuf6, " KMGTPEZY")[0] = '\0'; 643 642 printf(/*" %5.1f%% (%s)%c %s\n"*/ 644 643 " %5.1f%% (%s) %s\n", … … 676 675 //usage: "" 677 676 //usage:#define powertop_full_usage "\n\n" 678 //usage: "Analyze power consumption on Intel-based laptops \n"677 //usage: "Analyze power consumption on Intel-based laptops" 679 678 680 679 int powertop_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; … … 706 705 G.total_cpus = get_cpu_count(); 707 706 708 p rintf("Collecting data for "DEFAULT_SLEEP_STR" seconds\n");707 puts("Collecting data for "DEFAULT_SLEEP_STR" seconds"); 709 708 710 709 #if ENABLE_FEATURE_USE_TERMIOS
Note:
See TracChangeset
for help on using the changeset viewer.