diff options
author | Felix Buehler <account@buehler.rocks> | 2018-06-28 22:16:37 +0200 |
---|---|---|
committer | Felix Buehler <account@buehler.rocks> | 2018-06-29 22:56:09 +0200 |
commit | 4ea804b751f9394b7b10b520212169a491c698a6 (patch) | |
tree | 43d6d5908d5544ca1fdfbe96b078eaabe58a383d /src/print_wireless_info.c | |
parent | 4d3344ab9cd68bad5faf4ed3dad185dfcacb1e3d (diff) |
add format_quality option in wireless
Diffstat (limited to 'src/print_wireless_info.c')
-rw-r--r-- | src/print_wireless_info.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c index efdd59b..dcfde52 100644 --- a/src/print_wireless_info.c +++ b/src/print_wireless_info.c @@ -480,7 +480,7 @@ error1: * | 127.0.0.1 | no IP | IPv4 | ok | * | 127.0.0.1 | ::1/128 | IPv4 | ok | */ -void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface, const char *format_up, const char *format_down) { +void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface, const char *format_up, const char *format_down, const char *format_quality) { const char *walk; char *outwalk = buffer; wireless_info_t info; @@ -540,7 +540,7 @@ void print_wireless_info(yajl_gen json_gen, char *buffer, const char *interface, if (BEGINS_WITH(walk + 1, "quality")) { if (info.flags & WIRELESS_INFO_FLAG_HAS_QUALITY) { if (info.quality_max) - outwalk += sprintf(outwalk, "%3d%s", PERCENT_VALUE(info.quality, info.quality_max), pct_mark); + outwalk += sprintf(outwalk, format_quality, PERCENT_VALUE(info.quality, info.quality_max), pct_mark); else outwalk += sprintf(outwalk, "%d", info.quality); } else { |