Make use of the common VIRSH_COMMON_OPT_DOMAIN macro for each of the matching '.name = "domain"' command options. Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx> --- tools/virsh-domain-monitor.c | 77 ++++++++------------------------------------ 1 file changed, 13 insertions(+), 64 deletions(-) diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c index 7dcf833..6efb5c4 100644 --- a/tools/virsh-domain-monitor.c +++ b/tools/virsh-domain-monitor.c @@ -281,11 +281,7 @@ static const vshCmdInfo info_dommemstat[] = { }; static const vshCmdOptDef opts_dommemstat[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "period", .type = VSH_OT_INT, .flags = VSH_OFLAG_REQ_OPT, @@ -402,11 +398,7 @@ static const vshCmdInfo info_domblkinfo[] = { }; static const vshCmdOptDef opts_domblkinfo[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "device", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, @@ -457,11 +449,7 @@ static const vshCmdInfo info_domblklist[] = { }; static const vshCmdOptDef opts_domblklist[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "inactive", .type = VSH_OT_BOOL, .help = N_("get inactive rather than running configuration") @@ -579,11 +567,7 @@ static const vshCmdInfo info_domiflist[] = { }; static const vshCmdOptDef opts_domiflist[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "inactive", .type = VSH_OT_BOOL, .help = N_("get inactive rather than running configuration") @@ -684,11 +668,7 @@ static const vshCmdInfo info_domif_getlink[] = { }; static const vshCmdOptDef opts_domif_getlink[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "interface", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, @@ -799,11 +779,7 @@ static const vshCmdInfo info_domcontrol[] = { }; static const vshCmdOptDef opts_domcontrol[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = NULL} }; @@ -856,11 +832,7 @@ static const vshCmdInfo info_domblkstat[] = { }; static const vshCmdOptDef opts_domblkstat[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "device", .type = VSH_OT_STRING, .flags = VSH_OFLAG_EMPTY_OK, @@ -1046,11 +1018,7 @@ static const vshCmdInfo info_domifstat[] = { }; static const vshCmdOptDef opts_domifstat[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "interface", .type = VSH_OT_DATA, .flags = VSH_OFLAG_REQ, @@ -1123,11 +1091,7 @@ static const vshCmdInfo info_domblkerror[] = { }; static const vshCmdOptDef opts_domblkerror[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id, or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = NULL} }; @@ -1188,11 +1152,7 @@ static const vshCmdInfo info_dominfo[] = { }; static const vshCmdOptDef opts_dominfo[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = NULL} }; @@ -1331,11 +1291,7 @@ static const vshCmdInfo info_domstate[] = { }; static const vshCmdOptDef opts_domstate[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "reason", .type = VSH_OT_BOOL, .help = N_("also print reason for the state") @@ -1387,11 +1343,7 @@ static const vshCmdInfo info_domtime[] = { }; static const vshCmdOptDef opts_domtime[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid") - }, + VIRSH_COMMON_OPT_DOMAIN, {.name = "now", .type = VSH_OT_BOOL, .help = N_("set to the time of the host running virsh") @@ -2208,10 +2160,7 @@ static const vshCmdInfo info_domifaddr[] = { }; static const vshCmdOptDef opts_domifaddr[] = { - {.name = "domain", - .type = VSH_OT_DATA, - .flags = VSH_OFLAG_REQ, - .help = N_("domain name, id or uuid")}, + VIRSH_COMMON_OPT_DOMAIN, {.name = "interface", .type = VSH_OT_STRING, .flags = VSH_OFLAG_NONE, -- 2.5.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list