From 8379895227c5bea1fc2a98b2cf384ea27b3e341f Mon Sep 17 00:00:00 2001 From: Lin Ma Date: Tue, 8 May 2018 22:20:29 +0800 Subject: [PATCH] virsh: Move the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to virsh.h centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to virsh.h to avoid unnecessary duplicated definition Signed-off-by: Lin Ma Signed-off-by: Michal Privoznik --- tools/virsh-domain-monitor.c | 3 --- tools/virsh-domain.c | 3 --- tools/virsh-snapshot.c | 3 --- tools/virsh.h | 3 +++ 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 8e071779b4..071619d0e3 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -40,9 +40,6 @@ #include "virxml.h" #include "virstring.h" -#define VIRSH_COMMON_OPT_DOMAIN_FULL(cflags) \ - VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"), cflags) - VIR_ENUM_DECL(virshDomainIOError) VIR_ENUM_IMPL(virshDomainIOError, VIR_DOMAIN_DISK_ERROR_LAST, diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 598d2fa4a4..aa11a81638 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -65,9 +65,6 @@ # define SA_SIGINFO 0 #endif -#define VIRSH_COMMON_OPT_DOMAIN_FULL(cflags) \ - VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"), cflags) - #define VIRSH_COMMON_OPT_DOMAIN_PERSISTENT \ {.name = "persistent", \ .type = VSH_OT_BOOL, \ diff --git a/tools/virsh-snapshot.c b/tools/virsh-snapshot.c index e4908eea70..812fa91333 100644 --- a/tools/virsh-snapshot.c +++ b/tools/virsh-snapshot.c @@ -42,9 +42,6 @@ #include "virxml.h" #include "conf/snapshot_conf.h" -#define VIRSH_COMMON_OPT_DOMAIN_FULL(cflags) \ - VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"), cflags) - /* Helper for snapshot-create and snapshot-create-as */ static bool virshSnapshotCreate(vshControl *ctl, virDomainPtr dom, const char *buffer, diff --git a/tools/virsh.h b/tools/virsh.h index f2213ebb57..d977fe30df 100644 --- a/tools/virsh.h +++ b/tools/virsh.h @@ -82,6 +82,9 @@ .completer_flags = cflags, \ } +# define VIRSH_COMMON_OPT_DOMAIN_FULL(cflags) \ + VIRSH_COMMON_OPT_DOMAIN(N_("domain name, id or uuid"), cflags) + # define VIRSH_COMMON_OPT_CONFIG(_helpstr) \ {.name = "config", \ .type = VSH_OT_BOOL, \