static bool
cmdList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
- int inactive = vshCommandOptBool(cmd, "inactive");
- int all = vshCommandOptBool(cmd, "all");
- int active = !inactive || all ? 1 : 0;
+ bool inactive = vshCommandOptBool(cmd, "inactive");
+ bool all = vshCommandOptBool(cmd, "all");
+ bool active = !inactive || all;
int *ids = NULL, maxid = 0, i;
char **names = NULL;
int maxname = 0;
{
virDomainPtr dom;
bool ret = true;
- int showReason = vshCommandOptBool(cmd, "reason");
+ bool showReason = vshCommandOptBool(cmd, "reason");
int state, reason;
if (!vshConnectionUsability(ctl, ctl->conn))
int nparams = 0;
virTypedParameterPtr params = NULL;
bool ret = false;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
virNetDevBandwidthRate inbound, outbound;
int i;
bool ret = true;
char *buffer;
#ifndef WIN32
- int console = vshCommandOptBool(cmd, "console");
+ bool console = vshCommandOptBool(cmd, "console");
#endif
unsigned int flags = VIR_DOMAIN_NONE;
virDomainPtr dom;
bool ret = false;
#ifndef WIN32
- int console = vshCommandOptBool(cmd, "console");
+ bool console = vshCommandOptBool(cmd, "console");
#endif
unsigned int flags = VIR_DOMAIN_NONE;
int rc;
int i, ret;
bool ret_val = false;
unsigned int flags = 0;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
if (current) {
if (live || config) {
{
virDomainPtr dom;
bool ret = true;
- int maximum = vshCommandOptBool(cmd, "maximum");
- int active = vshCommandOptBool(cmd, "active");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
- int current = vshCommandOptBool(cmd, "current");
+ bool maximum = vshCommandOptBool(cmd, "maximum");
+ bool active = vshCommandOptBool(cmd, "active");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
bool all = maximum + active + current + config + live == 0;
int count;
int i, cpu, lastcpu, maxcpu, ncpus;
bool unuse = false;
const char *cur;
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
- int current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
bool query = false; /* Query mode if no cpulist */
unsigned int flags = 0;
virDomainPtr dom;
int count = 0;
bool ret = true;
- int maximum = vshCommandOptBool(cmd, "maximum");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
- int current = vshCommandOptBool(cmd, "current");
+ bool maximum = vshCommandOptBool(cmd, "maximum");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
unsigned int flags = 0;
if (current) {
unsigned long long max;
unsigned long kibibytes = 0;
bool ret = true;
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
- int current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
unsigned int flags = 0;
if (current) {
unsigned long long max;
unsigned long kibibytes = 0;
bool ret = true;
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
- int current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
unsigned int flags = VIR_DOMAIN_MEM_MAXIMUM;
if (current) {
virTypedParameterPtr params = NULL, temp = NULL;
bool ret = false;
unsigned int flags = 0;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
if (current) {
if (live || config) {
virTypedParameterPtr params = NULL, temp = NULL;
bool ret = false;
unsigned int flags = 0;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
if (current) {
if (live || config) {
const char *nodeset = NULL;
bool ret = false;
unsigned int flags = 0;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
const char *mode = NULL;
if (current) {
bool ret = true;
char *dump;
unsigned int flags = 0;
- int inactive = vshCommandOptBool(cmd, "inactive");
- int secure = vshCommandOptBool(cmd, "security-info");
- int update = vshCommandOptBool(cmd, "update-cpu");
+ bool inactive = vshCommandOptBool(cmd, "inactive");
+ bool secure = vshCommandOptBool(cmd, "security-info");
+ bool update = vshCommandOptBool(cmd, "update-cpu");
if (inactive)
flags |= VIR_DOMAIN_XML_INACTIVE;
virTypedParameterPtr params = NULL, temp = NULL;
unsigned int flags = 0, i = 0;
int rv = 0;
- int current = vshCommandOptBool(cmd, "current");
- int config = vshCommandOptBool(cmd, "config");
- int live = vshCommandOptBool(cmd, "live");
+ bool current = vshCommandOptBool(cmd, "current");
+ bool config = vshCommandOptBool(cmd, "config");
+ bool live = vshCommandOptBool(cmd, "live");
bool ret = false;
if (current) {
static bool
cmdNetworkList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
- int inactive = vshCommandOptBool(cmd, "inactive");
- int all = vshCommandOptBool(cmd, "all");
- int active = !inactive || all ? 1 : 0;
+ bool inactive = vshCommandOptBool(cmd, "inactive");
+ bool all = vshCommandOptBool(cmd, "all");
+ bool active = !inactive || all;
int maxactive = 0, maxinactive = 0, i;
char **activeNames = NULL, **inactiveNames = NULL;
inactive |= all;
static bool
cmdInterfaceList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
{
- int inactive = vshCommandOptBool(cmd, "inactive");
- int all = vshCommandOptBool(cmd, "all");
- int active = !inactive || all ? 1 : 0;
+ bool inactive = vshCommandOptBool(cmd, "inactive");
+ bool all = vshCommandOptBool(cmd, "all");
+ bool active = !inactive || all;
int maxactive = 0, maxinactive = 0, i;
char **activeNames = NULL, **inactiveNames = NULL;
inactive |= all;
bool ret = true;
char *dump;
unsigned int flags = 0;
- int inactive = vshCommandOptBool(cmd, "inactive");
+ bool inactive = vshCommandOptBool(cmd, "inactive");
if (inactive)
flags |= VIR_INTERFACE_XML_INACTIVE;
virStoragePoolPtr pool;
const char *name;
char *xml;
- int printXML = vshCommandOptBool(cmd, "print-xml");
+ bool printXML = vshCommandOptBool(cmd, "print-xml");
if (!vshConnectionUsability(ctl, ctl->conn))
return false;
virStoragePoolPtr pool;
const char *name;
char *xml;
- int printXML = vshCommandOptBool(cmd, "print-xml");
+ bool printXML = vshCommandOptBool(cmd, "print-xml");
if (!vshConnectionUsability(ctl, ctl->conn))
return false;
struct poolInfoText *poolInfoTexts = NULL;
/* Determine the options passed by the user */
- int all = vshCommandOptBool(cmd, "all");
- int details = vshCommandOptBool(cmd, "details");
- int inactive = vshCommandOptBool(cmd, "inactive");
- int active = !inactive || all ? 1 : 0;
+ bool all = vshCommandOptBool(cmd, "all");
+ bool details = vshCommandOptBool(cmd, "details");
+ bool inactive = vshCommandOptBool(cmd, "inactive");
+ bool active = !inactive || all;
inactive |= all;
/* Check the connection to libvirtd daemon is still working */
char *outputStr = NULL;
const char *unit;
double val;
- int details = vshCommandOptBool(cmd, "details");
+ bool details = vshCommandOptBool(cmd, "details");
int numVolumes = 0, i;
int ret;
bool functionReturn;
const char *cap = NULL;
char **devices;
int num_devices, i;
- int tree = vshCommandOptBool(cmd, "tree");
+ bool tree = vshCommandOptBool(cmd, "tree");
if (!vshConnectionUsability(ctl, ctl->conn))
return false;