#define VIRSH_COMMON_OPT_DOMAIN_LIVE \
VIRSH_COMMON_OPT_LIVE(N_("affect running domain")) \
+#define VIRSH_COMMON_OPT_DOMAIN_CURRENT \
+ VIRSH_COMMON_OPT_CURRENT(N_("affect current domain")) \
+
static virDomainPtr
virshLookupDomainInternal(vshControl *ctl,
const char *cmdname,
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = "print-xml",
.type = VSH_OT_BOOL,
.help = N_("print XML document rather than attach the interface")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
.flags = VSH_OFLAG_REQ_OPT,
.help = N_("cap for XEN_CREDIT")
},
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("get/set current scheduler info")
- },
+ VIRSH_COMMON_OPT_CURRENT(N_("get/set current scheduler info")),
VIRSH_COMMON_OPT_CONFIG(N_("get/set value to be used on next boot")),
VIRSH_COMMON_OPT_LIVE(N_("get/set value from running domain")),
{.name = "set",
},
VIRSH_COMMON_OPT_LIVE(N_("get value from running domain")),
VIRSH_COMMON_OPT_CONFIG(N_("get value to be used on next boot")),
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("get value according to current domain state")
- },
+ VIRSH_COMMON_OPT_CURRENT(N_("get value according to current domain state")),
{.name = "guest",
.type = VSH_OT_BOOL,
.help = N_("retrieve vcpu count from the guest instead of the hypervisor")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = "guest",
.type = VSH_OT_BOOL,
.help = N_("modify cpu state in the guest")
VIRSH_COMMON_OPT_DOMAIN_FULL,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_FULL,
VIRSH_COMMON_OPT_LIVE(N_("modify/get running state")),
VIRSH_COMMON_OPT_CONFIG(N_("modify/get persistent configuration")),
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("modify/get current state configuration")
- },
+ VIRSH_COMMON_OPT_CURRENT(N_("modify/get current state configuration")),
{.name = "title",
.type = VSH_OT_BOOL,
.help = N_("modify/get the title instead of description")
},
VIRSH_COMMON_OPT_LIVE(N_("modify/get running state")),
VIRSH_COMMON_OPT_CONFIG(N_("modify/get persistent configuration")),
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("modify/get current state configuration")
- },
+ VIRSH_COMMON_OPT_CURRENT(N_("modify/get current state configuration")),
{.name = "edit",
.type = VSH_OT_BOOL,
.help = N_("use an editor to change the metadata")
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
},
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = "force",
.type = VSH_OT_BOOL,
.help = N_("force device update")
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
VIRSH_COMMON_OPT_DOMAIN_PERSISTENT,
VIRSH_COMMON_OPT_DOMAIN_CONFIG,
VIRSH_COMMON_OPT_DOMAIN_LIVE,
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("affect current domain")
- },
+ VIRSH_COMMON_OPT_DOMAIN_CURRENT,
{.name = NULL}
};
.type = VSH_OT_BOOL,
.help = N_("Update the media")
},
- {.name = "current",
- .type = VSH_OT_BOOL,
- .help = N_("can be either or both of --live and --config, "
- "depends on implementation of hypervisor driver")
- },
+ VIRSH_COMMON_OPT_CURRENT(N_("can be either or both of --live and "
+ "--config, depends on implementation "
+ "hypervisor driver")),
VIRSH_COMMON_OPT_LIVE(N_("alter live configuration of running domain")),
VIRSH_COMMON_OPT_CONFIG(N_("alter persistent configuration, effect "
"observed on next boot")),