X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=procps%2Fiostat.c;h=c290c594b8ada48c8a1a5e7189da390fcb6c8001;hb=5f7c82b32f548b5a1d6a4186630e8ef496a9d5e6;hp=51c5fac08c43f240405fca15eb645684ae708a90;hpb=9f7780250ce4bbee9c0a8f1044875e303479e196;p=oweals%2Fbusybox.git diff --git a/procps/iostat.c b/procps/iostat.c index 51c5fac08..c290c594b 100644 --- a/procps/iostat.c +++ b/procps/iostat.c @@ -109,11 +109,6 @@ enum { OPT_m = 1 << 5, }; -static ALWAYS_INLINE unsigned get_user_hz(void) -{ - return sysconf(_SC_CLK_TCK); -} - static ALWAYS_INLINE int this_is_smp(void) { return (G.total_cpus > 1); @@ -147,7 +142,7 @@ static void print_timestamp(void) /* %x: date representation for the current locale */ /* %X: time representation for the current locale */ strftime(buf, sizeof(buf), "%x %X", &G.tmtime); - printf("%s\n", buf); + puts(buf); } static cputime_t get_smp_uptime(void) @@ -393,7 +388,6 @@ static void dev_report(cputime_t itv) //usage: "[-c] [-d] [-t] [-z] [-k|-m] [ALL|BLOCKDEV...] [INTERVAL [COUNT]]" //usage:#define iostat_full_usage "\n\n" //usage: "Report CPU and I/O statistics\n" -//usage: "\nOptions:" //usage: "\n -c Show CPU utilization" //usage: "\n -d Show device utilization" //usage: "\n -t Print current time" @@ -415,7 +409,7 @@ int iostat_main(int argc UNUSED_PARAM, char **argv) memset(&stats_data, 0, sizeof(stats_data)); /* Get number of clock ticks per sec */ - G.clk_tck = get_user_hz(); + G.clk_tck = bb_clk_tck(); /* Determine number of CPUs */ G.total_cpus = get_cpu_count();