diff options
author | Kamil CholewiĆski <harry666t@gmail.com> | 2017-09-08 23:08:28 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2017-09-10 14:08:20 +0200 |
commit | b7d7ce9c5f9ea360955325526e7f8010ae5b1347 (patch) | |
tree | f91edd92471e96ebf7e87f4a7a5c9b7e22803935 /slstatus.c | |
parent | 8f5219b6dab5a1c9b7f92362a34aacfd393fa0e4 (diff) |
slstatus load_avg format string
Diffstat (limited to 'slstatus.c')
-rw-r--r-- | slstatus.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -52,7 +52,7 @@ static const char *ipv4(const char *iface); static const char *ipv6(const char *iface); static const char *kernel_release(void); static const char *keyboard_indicators(void); -static const char *load_avg(void); +static const char *load_avg(const char *fmt); static const char *num_files(const char *dir); static const char *ram_free(void); static const char *ram_perc(void); @@ -394,7 +394,7 @@ keyboard_indicators(void) } static const char * -load_avg(void) +load_avg(const char *fmt) { double avgs[3]; @@ -403,7 +403,7 @@ load_avg(void) return unknown_str; } - return bprintf("%.2f %.2f %.2f", avgs[0], avgs[1], avgs[2]); + return bprintf(fmt, avgs[0], avgs[1], avgs[2]); } static const char * |