diff options
author | Michael Stapelberg | 2015-08-06 18:18:19 +0200 |
---|---|---|
committer | Michael Stapelberg | 2015-08-06 18:18:19 +0200 |
commit | 6d634b1b675f2e567daa05b6580d2d5b451a02a7 (patch) | |
tree | 4da576ce5f15d9405bdfb73aebab4686208d0f2f /src/print_eth_info.c | |
parent | Merge pull request #47 from czarkoff/sndio (diff) | |
parent | Use "color_degraded" when interface has no IP (diff) |
Merge pull request #50 from czarkoff/no_ip
Use "color_degraded" when interface has no IP
Diffstat (limited to 'src/print_eth_info.c')
-rw-r--r-- | src/print_eth_info.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/print_eth_info.c b/src/print_eth_info.c index 06a1613..e2326b5 100644 --- a/src/print_eth_info.c +++ b/src/print_eth_info.c @@ -126,7 +126,10 @@ void print_eth_info(yajl_gen json_gen, char *buffer, const char *interface, cons goto out; } - START_COLOR("color_good"); + if (BEGINS_WITH(ip_address, "no IP")) + START_COLOR("color_degraded"); + else + START_COLOR("color_good"); for (walk = format_up; *walk != '\0'; walk++) { if (*walk != '%') { |