summaryrefslogtreecommitdiff
path: root/src/print_wireless_info.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2010-06-24 23:59:44 +0200
committerMichael Stapelberg <michael@stapelberg.de>2010-06-24 23:59:44 +0200
commit506b17de6e97e23a3e2c5be01194624d32fe644d (patch)
tree578d7dc308e6e84c2187b899c839903b0b59a7fe /src/print_wireless_info.c
parent29e9a99f065137481dcab887971dae7e4a8c3e21 (diff)
Display wireless quality as percentage
Diffstat (limited to 'src/print_wireless_info.c')
-rw-r--r--src/print_wireless_info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print_wireless_info.c b/src/print_wireless_info.c
index e5d38fb..28d9cdb 100644
--- a/src/print_wireless_info.c
+++ b/src/print_wireless_info.c
@@ -101,7 +101,7 @@ void print_wireless_info(const char *interface, const char *format_up, const cha
if (BEGINS_WITH(walk+1, "quality")) {
int max_qual = get_wireless_quality_max(interface);
if (max_qual && max_qual >= quality)
- printf("%d/%d", quality, max_qual);
+ printf("%d%%", (int)(quality * (100.0 / max_qual)));
else
printf("%d", quality);
walk += strlen("quality");