vshPrint(ctl, _("Commands:\n\n"));
for (def = commands; def->name; def++)
vshPrint(ctl, " %-15s %s\n", def->name,
- _N(vshCmddefGetInfo(def, "help")));
+ N_(vshCmddefGetInfo(def, "help")));
return TRUE;
}
return vshCmddefHelp(ctl, cmdname, FALSE);
if (virDomainGetInfo(dom, &info) < 0)
state = _("no state");
else
- state = _N(vshDomainStateToString(info.state));
+ state = N_(vshDomainStateToString(info.state));
vshPrint(ctl, "%3d %-20s %s\n",
virDomainGetID(dom),
if (virDomainGetInfo(dom, &info) < 0)
state = _("no state");
else
- state = _N(vshDomainStateToString(info.state));
+ state = N_(vshDomainStateToString(info.state));
vshPrint(ctl, "%3s %-20s %s\n", "-", names[i], state);
if (virDomainGetInfo(dom, &info) == 0)
vshPrint(ctl, "%s\n",
- _N(vshDomainStateToString(info.state)));
+ N_(vshDomainStateToString(info.state)));
else
ret = FALSE;
};
static vshCmdOptDef opts_create[] = {
- {"file", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("file conatining an XML domain description")},
+ {"file", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("file containing an XML domain description")},
{NULL, 0, 0, NULL}
};
if (virDomainGetInfo(dom, &info) == 0) {
vshPrint(ctl, "%-15s %s\n", _("State:"),
- _N(vshDomainStateToString(info.state)));
+ N_(vshDomainStateToString(info.state)));
vshPrint(ctl, "%-15s %d\n", _("CPU(s):"), info.nrVirtCpu);
vshPrint(ctl, "%-15s %d\n", _("VCPU:"), n);
vshPrint(ctl, "%-15s %d\n", _("CPU:"), cpuinfo[n].cpu);
vshPrint(ctl, "%-15s %s\n", _("State:"),
- _N(vshDomainVcpuStateToString(cpuinfo[n].state)));
+ N_(vshDomainVcpuStateToString(cpuinfo[n].state)));
if (cpuinfo[n].cpuTime != 0) {
double cpuUsed = cpuinfo[n].cpuTime;
}
}
} else {
+ if (info.state == VIR_DOMAIN_SHUTOFF) {
+ vshError(ctl, FALSE,
+ _("Domain shut off, virtual CPUs not present."));
+ }
ret = FALSE;
}
count = vshCommandOptInt(cmd, "count", &count);
if (!count) {
+ vshError(ctl, FALSE, _("Invalid number of virtual CPUs."));
virDomainFree(dom);
return FALSE;
}
}
if (count > maxcpu) {
- vshError(ctl, FALSE, _("Too many virtual CPU's."));
+ vshError(ctl, FALSE, _("Too many virtual CPUs."));
virDomainFree(dom);
return FALSE;
}
return FALSE;
} else {
vshCmdOptDef *opt;
- const char *desc = _N(vshCmddefGetInfo(def, "desc"));
- const char *help = _N(vshCmddefGetInfo(def, "help"));
+ const char *desc = N_(vshCmddefGetInfo(def, "desc"));
+ const char *help = N_(vshCmddefGetInfo(def, "help"));
const char *syntax = vshCmddefGetInfo(def, "syntax");
fputs(_(" NAME\n"), stdout);
else if (opt->type == VSH_OT_DATA)
snprintf(buf, sizeof(buf), "<%s>", opt->name);
- fprintf(stdout, " %-15s %s\n", buf, _N(opt->help));
+ fprintf(stdout, " %-15s %s\n", buf, N_(opt->help));
}
}
fputc('\n', stdout);
for (cmd = commands; cmd->name; cmd++)
fprintf(stdout,
- " %-15s %s\n", cmd->name, _N(vshCmddefGetInfo(cmd,
+ " %-15s %s\n", cmd->name, N_(vshCmddefGetInfo(cmd,
"help")));
fprintf(stdout,