mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
maint: fix comma style issues: qemu
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/qemu/qemu_cgroup.c: Consistently use commas. * src/qemu/qemu_command.c: Likewise. * src/qemu/qemu_conf.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/qemu/qemu_monitor.c: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
86f6748bda
commit
5d509e9ee2
@ -417,7 +417,7 @@ qemuSetupMemoryCgroup(virDomainObjPtr vm)
|
|||||||
{
|
{
|
||||||
qemuDomainObjPrivatePtr priv = vm->privateData;
|
qemuDomainObjPrivatePtr priv = vm->privateData;
|
||||||
|
|
||||||
if (!virCgroupHasController(priv->cgroup,VIR_CGROUP_CONTROLLER_MEMORY)) {
|
if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_MEMORY)) {
|
||||||
if (vm->def->mem.hard_limit != 0 ||
|
if (vm->def->mem.hard_limit != 0 ||
|
||||||
vm->def->mem.soft_limit != 0 ||
|
vm->def->mem.soft_limit != 0 ||
|
||||||
vm->def->mem.swap_hard_limit != 0) {
|
vm->def->mem.swap_hard_limit != 0) {
|
||||||
|
@ -1149,7 +1149,7 @@ int qemuDomainCCWAddressAssign(virDomainDeviceInfoPtr dev,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virHashAddEntry(addrs->defined,addr,addr) < 0)
|
if (virHashAddEntry(addrs->defined, addr, addr) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
else
|
else
|
||||||
addr = NULL; /* memory will be freed by hash table */
|
addr = NULL; /* memory will be freed by hash table */
|
||||||
@ -1179,7 +1179,7 @@ qemuDomainPrimeVirtioDeviceAddresses(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < def->nnets; i++) {
|
for (i = 0; i < def->nnets; i++) {
|
||||||
if (STREQ(def->nets[i]->model,"virtio") &&
|
if (STREQ(def->nets[i]->model, "virtio") &&
|
||||||
def->nets[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
def->nets[i]->info.type == VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
|
||||||
def->nets[i]->info.type = type;
|
def->nets[i]->info.type = type;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,8 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
|
|||||||
if (VIR_STRDUP(cfg->spiceListen, "127.0.0.1") < 0)
|
if (VIR_STRDUP(cfg->spiceListen, "127.0.0.1") < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (VIR_STRDUP(cfg->spiceTLSx509certdir , SYSCONFDIR "/pki/libvirt-spice") < 0)
|
if (VIR_STRDUP(cfg->spiceTLSx509certdir,
|
||||||
|
SYSCONFDIR "/pki/libvirt-spice") < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
cfg->remotePortMin = QEMU_REMOTE_PORT_MIN;
|
cfg->remotePortMin = QEMU_REMOTE_PORT_MIN;
|
||||||
|
@ -1918,7 +1918,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
|
|||||||
int agentFlag = QEMU_AGENT_SHUTDOWN_REBOOT;
|
int agentFlag = QEMU_AGENT_SHUTDOWN_REBOOT;
|
||||||
|
|
||||||
virCheckFlags(VIR_DOMAIN_REBOOT_ACPI_POWER_BTN |
|
virCheckFlags(VIR_DOMAIN_REBOOT_ACPI_POWER_BTN |
|
||||||
VIR_DOMAIN_REBOOT_GUEST_AGENT , -1);
|
VIR_DOMAIN_REBOOT_GUEST_AGENT, -1);
|
||||||
|
|
||||||
/* At most one of these two flags should be set. */
|
/* At most one of these two flags should be set. */
|
||||||
if ((flags & VIR_DOMAIN_REBOOT_ACPI_POWER_BTN) &&
|
if ((flags & VIR_DOMAIN_REBOOT_ACPI_POWER_BTN) &&
|
||||||
|
@ -239,8 +239,8 @@ static char * qemuMonitorEscapeNonPrintable(const char *text)
|
|||||||
for (i = 0; text[i] != '\0'; i++) {
|
for (i = 0; text[i] != '\0'; i++) {
|
||||||
if (c_isprint(text[i]) ||
|
if (c_isprint(text[i]) ||
|
||||||
text[i] == '\n' ||
|
text[i] == '\n' ||
|
||||||
(text[i] == '\r' && text[i+1] == '\n'))
|
(text[i] == '\r' && text[i + 1] == '\n'))
|
||||||
virBufferAsprintf(&buf,"%c", text[i]);
|
virBufferAddChar(&buf, text[i]);
|
||||||
else
|
else
|
||||||
virBufferAsprintf(&buf, "0x%02x", text[i]);
|
virBufferAsprintf(&buf, "0x%02x", text[i]);
|
||||||
}
|
}
|
||||||
@ -3040,7 +3040,7 @@ int qemuMonitorCreateSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
VIR_DEBUG("mon=%p, name=%s", mon, name);
|
||||||
|
|
||||||
if (!mon) {
|
if (!mon) {
|
||||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
@ -3059,7 +3059,7 @@ int qemuMonitorLoadSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
VIR_DEBUG("mon=%p, name=%s", mon, name);
|
||||||
|
|
||||||
if (!mon) {
|
if (!mon) {
|
||||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
@ -3078,7 +3078,7 @@ int qemuMonitorDeleteSnapshot(qemuMonitorPtr mon, const char *name)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
VIR_DEBUG("mon=%p, name=%s",mon,name);
|
VIR_DEBUG("mon=%p, name=%s", mon, name);
|
||||||
|
|
||||||
if (!mon) {
|
if (!mon) {
|
||||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
@ -3276,7 +3276,7 @@ int qemuMonitorScreendump(qemuMonitorPtr mon,
|
|||||||
VIR_DEBUG("mon=%p, file=%s", mon, file);
|
VIR_DEBUG("mon=%p, file=%s", mon, file);
|
||||||
|
|
||||||
if (!mon) {
|
if (!mon) {
|
||||||
virReportError(VIR_ERR_INVALID_ARG,"%s",
|
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||||
_("monitor must not be NULL"));
|
_("monitor must not be NULL"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user