lib: make resolve_hosts variable common
Any iproute utility that uses any function from lib/utils.c needs to declare its own resolve_hosts variable instance although it does not need/use hostname resolving functionality (currently only 'ip' and 'ss' commands uses this). The patch declares single common instance of resolve_hosts directly in utils.c so the existing ones can be removed (the same approach that is used for timestamp_short). Cc: Jiri Pirko <jiri@mellanox.com> Cc: Arkadi Sharshevsky <arkadis@mellanox.com> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
This commit is contained in:
parent
274b63ae21
commit
6648853975
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
struct rtnl_handle rth = { .fd = -1 };
|
||||
int preferred_family = AF_UNSPEC;
|
||||
int resolve_hosts;
|
||||
int oneline;
|
||||
int show_stats;
|
||||
int show_details;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
int show_stats = 0;
|
||||
int show_details = 0;
|
||||
int show_raw = 0;
|
||||
int resolve_hosts = 0;
|
||||
|
||||
static void *BODY;
|
||||
static struct genl_util * genl_list;
|
||||
|
|
|
|||
1
ip/ip.c
1
ip/ip.c
|
|
@ -30,7 +30,6 @@ int human_readable;
|
|||
int use_iec;
|
||||
int show_stats;
|
||||
int show_details;
|
||||
int resolve_hosts;
|
||||
int oneline;
|
||||
int brief;
|
||||
int json;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#include "utils.h"
|
||||
#include "libnetlink.h"
|
||||
|
||||
int resolve_hosts;
|
||||
static int init_phase = 1;
|
||||
|
||||
static void write_stamp(FILE *fp)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "utils.h"
|
||||
#include "namespace.h"
|
||||
|
||||
int resolve_hosts;
|
||||
int timestamp_short;
|
||||
|
||||
int get_hex(char c)
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@
|
|||
#include "utils.h"
|
||||
#include "rt_names.h"
|
||||
|
||||
int resolve_hosts;
|
||||
|
||||
DB *dbase;
|
||||
char *dbname = "/var/lib/arpd/arpd.db";
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ static int security_get_initial_context(char *name, char **context)
|
|||
}
|
||||
#endif
|
||||
|
||||
int resolve_hosts;
|
||||
int resolve_services = 1;
|
||||
int preferred_family = AF_UNSPEC;
|
||||
int show_options;
|
||||
|
|
|
|||
Loading…
Reference in New Issue