ash: add INT_OFF/ON around allocations
[oweals/busybox.git] / procps / iostat.c
index 51c5fac08c43f240405fca15eb645684ae708a90..c290c594b8ada48c8a1a5e7189da390fcb6c8001 100644 (file)
@@ -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();