mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-15 22:15:13 +08:00
1ca4341d2c
Instead of declaring -color and -json exclusive, ignore -color when -json is provided. The rationale is to allow to put -color in an alias for ip while still being able to use -json. -color is merely a presentation suggestion and we can assume there is nothing to color in the JSON output. Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
22 lines
447 B
C
22 lines
447 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __COLOR_H__
|
|
#define __COLOR_H__ 1
|
|
|
|
enum color_attr {
|
|
COLOR_IFNAME,
|
|
COLOR_MAC,
|
|
COLOR_INET,
|
|
COLOR_INET6,
|
|
COLOR_OPERSTATE_UP,
|
|
COLOR_OPERSTATE_DOWN,
|
|
COLOR_NONE
|
|
};
|
|
|
|
void enable_color(void);
|
|
void set_color_palette(void);
|
|
int color_fprintf(FILE *fp, enum color_attr attr, const char *fmt, ...);
|
|
enum color_attr ifa_family_color(__u8 ifa_family);
|
|
enum color_attr oper_state_color(__u8 state);
|
|
|
|
#endif
|