mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
src/lxc: Remove the whitespace before ";"
This commit is contained in:
parent
77e2d3777d
commit
1ea88abd7e
@ -427,7 +427,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0 ; i < def->ndisks ; i++) {
|
for (i = 0; i < def->ndisks; i++) {
|
||||||
if (def->disks[i]->type != VIR_DOMAIN_DISK_TYPE_BLOCK)
|
if (def->disks[i]->type != VIR_DOMAIN_DISK_TYPE_BLOCK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -445,7 +445,7 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0 ; i < def->nfss ; i++) {
|
for (i = 0; i < def->nfss; i++) {
|
||||||
if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_BLOCK)
|
if (def->fss[i]->type != VIR_DOMAIN_FS_TYPE_BLOCK)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ static int lxcContainerRenameAndEnableInterfaces(bool privNet,
|
|||||||
size_t i;
|
size_t i;
|
||||||
char *newname = NULL;
|
char *newname = NULL;
|
||||||
|
|
||||||
for (i = 0 ; i < nveths ; i++) {
|
for (i = 0; i < nveths; i++) {
|
||||||
if (virAsprintf(&newname, "eth%zu", i) < 0) {
|
if (virAsprintf(&newname, "eth%zu", i) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
rc = -1;
|
rc = -1;
|
||||||
@ -475,7 +475,7 @@ static int lxcContainerUnmountSubtree(const char *prefix,
|
|||||||
|
|
||||||
if (lxcContainerGetSubtree(prefix, &mounts, &nmounts) < 0)
|
if (lxcContainerGetSubtree(prefix, &mounts, &nmounts) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
for (i = 0 ; i < nmounts ; i++) {
|
for (i = 0; i < nmounts; i++) {
|
||||||
VIR_DEBUG("Umount %s", mounts[i]);
|
VIR_DEBUG("Umount %s", mounts[i]);
|
||||||
if (umount(mounts[i]) < 0) {
|
if (umount(mounts[i]) < 0) {
|
||||||
char ebuf[1024];
|
char ebuf[1024];
|
||||||
@ -509,7 +509,7 @@ static int lxcContainerUnmountSubtree(const char *prefix,
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0 ; i < nmounts ; i++)
|
for (i = 0; i < nmounts; i++)
|
||||||
VIR_FREE(mounts[i]);
|
VIR_FREE(mounts[i]);
|
||||||
VIR_FREE(mounts);
|
VIR_FREE(mounts);
|
||||||
|
|
||||||
@ -689,7 +689,7 @@ static int lxcContainerMountBasicFS(char *sec_mount_options)
|
|||||||
|
|
||||||
VIR_DEBUG("Mounting basic filesystems sec_mount_options=%s", sec_mount_options);
|
VIR_DEBUG("Mounting basic filesystems sec_mount_options=%s", sec_mount_options);
|
||||||
|
|
||||||
for (i = 0 ; i < ARRAY_CARDINALITY(mnts) ; i++) {
|
for (i = 0; i < ARRAY_CARDINALITY(mnts); i++) {
|
||||||
const char *srcpath = NULL;
|
const char *srcpath = NULL;
|
||||||
|
|
||||||
VIR_DEBUG("Processing %s -> %s",
|
VIR_DEBUG("Processing %s -> %s",
|
||||||
@ -849,7 +849,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Populate /dev/ with a few important bits */
|
/* Populate /dev/ with a few important bits */
|
||||||
for (i = 0 ; i < ARRAY_CARDINALITY(devs) ; i++) {
|
for (i = 0; i < ARRAY_CARDINALITY(devs); i++) {
|
||||||
dev_t dev = makedev(devs[i].maj, devs[i].min);
|
dev_t dev = makedev(devs[i].maj, devs[i].min);
|
||||||
if (mknod(devs[i].path, S_IFCHR, dev) < 0 ||
|
if (mknod(devs[i].path, S_IFCHR, dev) < 0 ||
|
||||||
chmod(devs[i].path, devs[i].mode)) {
|
chmod(devs[i].path, devs[i].mode)) {
|
||||||
@ -860,7 +860,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0 ; i < ARRAY_CARDINALITY(links) ; i++) {
|
for (i = 0; i < ARRAY_CARDINALITY(links); i++) {
|
||||||
if (symlink(links[i].src, links[i].dst) < 0) {
|
if (symlink(links[i].src, links[i].dst) < 0) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Failed to symlink device %s to %s"),
|
_("Failed to symlink device %s to %s"),
|
||||||
@ -890,7 +890,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0 ; i < nttyPaths ; i++) {
|
for (i = 0; i < nttyPaths; i++) {
|
||||||
char *tty;
|
char *tty;
|
||||||
if (virAsprintf(&tty, "/dev/tty%zu", i+1) < 0) {
|
if (virAsprintf(&tty, "/dev/tty%zu", i+1) < 0) {
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -1356,7 +1356,7 @@ static int lxcContainerMountAllFS(virDomainDefPtr vmDef,
|
|||||||
VIR_DEBUG("Mounting all non-root filesystems");
|
VIR_DEBUG("Mounting all non-root filesystems");
|
||||||
|
|
||||||
/* Pull in rest of container's mounts */
|
/* Pull in rest of container's mounts */
|
||||||
for (i = 0 ; i < vmDef->nfss ; i++) {
|
for (i = 0; i < vmDef->nfss; i++) {
|
||||||
if (STREQ(vmDef->fss[i]->dst, "/"))
|
if (STREQ(vmDef->fss[i]->dst, "/"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1460,7 +1460,7 @@ static int lxcContainerSetupAllDisks(virDomainDefPtr vmDef,
|
|||||||
size_t i;
|
size_t i;
|
||||||
VIR_DEBUG("Setting up disks");
|
VIR_DEBUG("Setting up disks");
|
||||||
|
|
||||||
for (i = 0 ; i < vmDef->ndisks ; i++) {
|
for (i = 0; i < vmDef->ndisks; i++) {
|
||||||
if (lxcContainerSetupDisk(vmDef, vmDef->disks[i],
|
if (lxcContainerSetupDisk(vmDef, vmDef->disks[i],
|
||||||
securityDriver) < 0)
|
securityDriver) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -1702,7 +1702,7 @@ static int lxcContainerSetupAllHostdevs(virDomainDefPtr vmDef,
|
|||||||
size_t i;
|
size_t i;
|
||||||
VIR_DEBUG("Setting up hostdevs");
|
VIR_DEBUG("Setting up hostdevs");
|
||||||
|
|
||||||
for (i = 0 ; i < vmDef->nhostdevs ; i++) {
|
for (i = 0; i < vmDef->nhostdevs; i++) {
|
||||||
virDomainHostdevDefPtr def = vmDef->hostdevs[i];
|
virDomainHostdevDefPtr def = vmDef->hostdevs[i];
|
||||||
switch (def->mode) {
|
switch (def->mode) {
|
||||||
case VIR_DOMAIN_HOSTDEV_MODE_SUBSYS:
|
case VIR_DOMAIN_HOSTDEV_MODE_SUBSYS:
|
||||||
@ -1840,7 +1840,7 @@ static int lxcContainerResolveSymlinks(virDomainDefPtr vmDef)
|
|||||||
char *newroot;
|
char *newroot;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0 ; i < vmDef->nfss ; i++) {
|
for (i = 0; i < vmDef->nfss; i++) {
|
||||||
virDomainFSDefPtr fs = vmDef->fss[i];
|
virDomainFSDefPtr fs = vmDef->fss[i];
|
||||||
if (!fs->src)
|
if (!fs->src)
|
||||||
continue;
|
continue;
|
||||||
@ -2070,7 +2070,7 @@ lxcNeedNetworkNamespace(virDomainDefPtr def)
|
|||||||
return true;
|
return true;
|
||||||
if (def->features & (1 << VIR_DOMAIN_FEATURE_PRIVNET))
|
if (def->features & (1 << VIR_DOMAIN_FEATURE_PRIVNET))
|
||||||
return true;
|
return true;
|
||||||
for (i = 0 ; i < def->nhostdevs ; i++) {
|
for (i = 0; i < def->nhostdevs; i++) {
|
||||||
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES &&
|
if (def->hostdevs[i]->mode == VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES &&
|
||||||
def->hostdevs[i]->source.caps.type == VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET)
|
def->hostdevs[i]->source.caps.type == VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET)
|
||||||
return true;
|
return true;
|
||||||
|
@ -199,7 +199,7 @@ static int virLXCControllerCloseLoopDevices(virLXCControllerPtr ctrl)
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nloopDevs ; i++)
|
for (i = 0; i < ctrl->nloopDevs; i++)
|
||||||
VIR_FORCE_CLOSE(ctrl->loopDevFds[i]);
|
VIR_FORCE_CLOSE(ctrl->loopDevFds[i]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -251,11 +251,11 @@ static void virLXCControllerFree(virLXCControllerPtr ctrl)
|
|||||||
|
|
||||||
virObjectUnref(ctrl->securityManager);
|
virObjectUnref(ctrl->securityManager);
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nveths ; i++)
|
for (i = 0; i < ctrl->nveths; i++)
|
||||||
VIR_FREE(ctrl->veths[i]);
|
VIR_FREE(ctrl->veths[i]);
|
||||||
VIR_FREE(ctrl->veths);
|
VIR_FREE(ctrl->veths);
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++)
|
for (i = 0; i < ctrl->nconsoles; i++)
|
||||||
virLXCControllerConsoleClose(&(ctrl->consoles[i]));
|
virLXCControllerConsoleClose(&(ctrl->consoles[i]));
|
||||||
VIR_FREE(ctrl->consoles);
|
VIR_FREE(ctrl->consoles);
|
||||||
|
|
||||||
@ -450,7 +450,7 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
|
|||||||
size_t i;
|
size_t i;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->def->nfss ; i++) {
|
for (i = 0; i < ctrl->def->nfss; i++) {
|
||||||
virDomainFSDefPtr fs = ctrl->def->fss[i];
|
virDomainFSDefPtr fs = ctrl->def->fss[i];
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -487,7 +487,7 @@ static int virLXCControllerSetupLoopDevices(virLXCControllerPtr ctrl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->def->ndisks ; i++) {
|
for (i = 0; i < ctrl->def->ndisks; i++) {
|
||||||
virDomainDiskDefPtr disk = ctrl->def->disks[i];
|
virDomainDiskDefPtr disk = ctrl->def->disks[i];
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@ -1067,7 +1067,7 @@ static int virLXCControllerMain(virLXCControllerPtr ctrl)
|
|||||||
|
|
||||||
virResetLastError();
|
virResetLastError();
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++) {
|
for (i = 0; i < ctrl->nconsoles; i++) {
|
||||||
if ((ctrl->consoles[i].epollFd = epoll_create1(EPOLL_CLOEXEC)) < 0) {
|
if ((ctrl->consoles[i].epollFd = epoll_create1(EPOLL_CLOEXEC)) < 0) {
|
||||||
virReportSystemError(errno, "%s",
|
virReportSystemError(errno, "%s",
|
||||||
_("Unable to create epoll fd"));
|
_("Unable to create epoll fd"));
|
||||||
@ -1115,7 +1115,7 @@ cleanup:
|
|||||||
virMutexDestroy(&lock);
|
virMutexDestroy(&lock);
|
||||||
cleanup2:
|
cleanup2:
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++)
|
for (i = 0; i < ctrl->nconsoles; i++)
|
||||||
virLXCControllerConsoleClose(&(ctrl->consoles[i]));
|
virLXCControllerConsoleClose(&(ctrl->consoles[i]));
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
@ -1138,7 +1138,7 @@ static int virLXCControllerMoveInterfaces(virLXCControllerPtr ctrl)
|
|||||||
size_t i;
|
size_t i;
|
||||||
virDomainDefPtr def = ctrl->def;
|
virDomainDefPtr def = ctrl->def;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nveths ; i++) {
|
for (i = 0; i < ctrl->nveths; i++) {
|
||||||
if (virNetDevSetNamespace(ctrl->veths[i], ctrl->initpid) < 0)
|
if (virNetDevSetNamespace(ctrl->veths[i], ctrl->initpid) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1175,7 +1175,7 @@ static int virLXCControllerDeleteInterfaces(virLXCControllerPtr ctrl)
|
|||||||
size_t i;
|
size_t i;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nveths ; i++) {
|
for (i = 0; i < ctrl->nveths; i++) {
|
||||||
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
|
if (virNetDevVethDelete(ctrl->veths[i]) < 0)
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
@ -1371,7 +1371,7 @@ virLXCControllerSetupConsoles(virLXCControllerPtr ctrl,
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++) {
|
for (i = 0; i < ctrl->nconsoles; i++) {
|
||||||
VIR_DEBUG("Opening tty on private %s", ctrl->devptmx);
|
VIR_DEBUG("Opening tty on private %s", ctrl->devptmx);
|
||||||
if (lxcCreateTty(ctrl->devptmx,
|
if (lxcCreateTty(ctrl->devptmx,
|
||||||
&ctrl->consoles[i].contFd,
|
&ctrl->consoles[i].contFd,
|
||||||
@ -1568,7 +1568,7 @@ virLXCControllerRun(virLXCControllerPtr ctrl)
|
|||||||
if (virLXCControllerDaemonHandshake(ctrl) < 0)
|
if (virLXCControllerDaemonHandshake(ctrl) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++)
|
for (i = 0; i < ctrl->nconsoles; i++)
|
||||||
if (virLXCControllerConsoleSetNonblocking(&(ctrl->consoles[i])) < 0)
|
if (virLXCControllerConsoleSetNonblocking(&(ctrl->consoles[i])) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
@ -1582,7 +1582,7 @@ cleanup:
|
|||||||
VIR_FORCE_CLOSE(containerhandshake[0]);
|
VIR_FORCE_CLOSE(containerhandshake[0]);
|
||||||
VIR_FORCE_CLOSE(containerhandshake[1]);
|
VIR_FORCE_CLOSE(containerhandshake[1]);
|
||||||
|
|
||||||
for (i = 0 ; i < ctrl->nconsoles ; i++)
|
for (i = 0; i < ctrl->nconsoles; i++)
|
||||||
VIR_FREE(containerTTYPaths[i]);
|
VIR_FREE(containerTTYPaths[i]);
|
||||||
VIR_FREE(containerTTYPaths);
|
VIR_FREE(containerTTYPaths);
|
||||||
|
|
||||||
@ -1739,7 +1739,7 @@ int main(int argc, char *argv[])
|
|||||||
ctrl->veths = veths;
|
ctrl->veths = veths;
|
||||||
ctrl->nveths = nveths;
|
ctrl->nveths = nveths;
|
||||||
|
|
||||||
for (i = 0 ; i < nttyFDs ; i++) {
|
for (i = 0; i < nttyFDs; i++) {
|
||||||
if (virLXCControllerAddConsole(ctrl, ttyFDs[i]) < 0)
|
if (virLXCControllerAddConsole(ctrl, ttyFDs[i]) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
ttyFDs[i] = -1;
|
ttyFDs[i] = -1;
|
||||||
@ -1801,7 +1801,7 @@ cleanup:
|
|||||||
virPidFileDelete(LXC_STATE_DIR, name);
|
virPidFileDelete(LXC_STATE_DIR, name);
|
||||||
if (ctrl)
|
if (ctrl)
|
||||||
virLXCControllerDeleteInterfaces(ctrl);
|
virLXCControllerDeleteInterfaces(ctrl);
|
||||||
for (i = 0 ; i < nttyFDs ; i++)
|
for (i = 0; i < nttyFDs; i++)
|
||||||
VIR_FORCE_CLOSE(ttyFDs[i]);
|
VIR_FORCE_CLOSE(ttyFDs[i]);
|
||||||
VIR_FREE(ttyFDs);
|
VIR_FREE(ttyFDs);
|
||||||
|
|
||||||
|
@ -2191,7 +2191,7 @@ lxcDomainInterfaceStats(virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Check the path is one of the domain's network interfaces. */
|
/* Check the path is one of the domain's network interfaces. */
|
||||||
for (i = 0 ; i < vm->def->nnets ; i++) {
|
for (i = 0; i < vm->def->nnets; i++) {
|
||||||
if (vm->def->nets[i]->ifname &&
|
if (vm->def->nets[i]->ifname &&
|
||||||
STREQ(vm->def->nets[i]->ifname, path)) {
|
STREQ(vm->def->nets[i]->ifname, path)) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -2544,7 +2544,7 @@ lxcDomainOpenConsole(virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dev_name) {
|
if (dev_name) {
|
||||||
for (i = 0 ; i < vm->def->nconsoles ; i++) {
|
for (i = 0; i < vm->def->nconsoles; i++) {
|
||||||
if (vm->def->consoles[i]->info.alias &&
|
if (vm->def->consoles[i]->info.alias &&
|
||||||
STREQ(vm->def->consoles[i]->info.alias, dev_name)) {
|
STREQ(vm->def->consoles[i]->info.alias, dev_name)) {
|
||||||
chr = vm->def->consoles[i];
|
chr = vm->def->consoles[i];
|
||||||
|
@ -232,7 +232,7 @@ virLXCPrepareHostUSBDevices(virLXCDriverPtr driver,
|
|||||||
|
|
||||||
/* Loop 1: build temporary list
|
/* Loop 1: build temporary list
|
||||||
*/
|
*/
|
||||||
for (i = 0 ; i < nhostdevs ; i++) {
|
for (i = 0; i < nhostdevs; i++) {
|
||||||
virDomainHostdevDefPtr hostdev = hostdevs[i];
|
virDomainHostdevDefPtr hostdev = hostdevs[i];
|
||||||
bool required = true;
|
bool required = true;
|
||||||
virUSBDevicePtr usb;
|
virUSBDevicePtr usb;
|
||||||
@ -287,7 +287,7 @@ int virLXCPrepareHostDevices(virLXCDriverPtr driver,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Sanity check for supported configurations only */
|
/* Sanity check for supported configurations only */
|
||||||
for (i = 0 ; i < def->nhostdevs ; i++) {
|
for (i = 0; i < def->nhostdevs; i++) {
|
||||||
virDomainHostdevDefPtr dev = def->hostdevs[i];
|
virDomainHostdevDefPtr dev = def->hostdevs[i];
|
||||||
|
|
||||||
switch (dev->mode) {
|
switch (dev->mode) {
|
||||||
|
@ -261,7 +261,7 @@ static void virLXCProcessCleanup(virLXCDriverPtr driver,
|
|||||||
|
|
||||||
virLXCDomainReAttachHostDevices(driver, vm->def);
|
virLXCDomainReAttachHostDevices(driver, vm->def);
|
||||||
|
|
||||||
for (i = 0 ; i < vm->def->nnets ; i++) {
|
for (i = 0; i < vm->def->nnets; i++) {
|
||||||
virDomainNetDefPtr iface = vm->def->nets[i];
|
virDomainNetDefPtr iface = vm->def->nets[i];
|
||||||
vport = virDomainNetGetActualVirtPortProfile(iface);
|
vport = virDomainNetGetActualVirtPortProfile(iface);
|
||||||
if (iface->ifname) {
|
if (iface->ifname) {
|
||||||
@ -433,7 +433,7 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0 ; i < def->nnets ; i++) {
|
for (i = 0; i < def->nnets; i++) {
|
||||||
char *veth = NULL;
|
char *veth = NULL;
|
||||||
/* If appropriate, grab a physical device from the configured
|
/* If appropriate, grab a physical device from the configured
|
||||||
* network's pool of devices, or resolve bridge device name
|
* network's pool of devices, or resolve bridge device name
|
||||||
@ -536,7 +536,7 @@ static int virLXCProcessSetupInterfaces(virConnectPtr conn,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
for (i = 0 ; i < def->nnets ; i++) {
|
for (i = 0; i < def->nnets; i++) {
|
||||||
virDomainNetDefPtr iface = def->nets[i];
|
virDomainNetDefPtr iface = def->nets[i];
|
||||||
virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(iface);
|
virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(iface);
|
||||||
if (vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH)
|
if (vport && vport->virtPortType == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH)
|
||||||
@ -851,7 +851,7 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virCommandAddArgList(cmd, "--name", vm->def->name, NULL);
|
virCommandAddArgList(cmd, "--name", vm->def->name, NULL);
|
||||||
for (i = 0 ; i < nttyFDs ; i++) {
|
for (i = 0; i < nttyFDs; i++) {
|
||||||
virCommandAddArg(cmd, "--console");
|
virCommandAddArg(cmd, "--console");
|
||||||
virCommandAddArgFormat(cmd, "%d", ttyFDs[i]);
|
virCommandAddArgFormat(cmd, "%d", ttyFDs[i]);
|
||||||
virCommandPreserveFD(cmd, ttyFDs[i]);
|
virCommandPreserveFD(cmd, ttyFDs[i]);
|
||||||
@ -864,7 +864,7 @@ virLXCProcessBuildControllerCmd(virLXCDriverPtr driver,
|
|||||||
virCommandAddArgFormat(cmd, "%d", handshakefd);
|
virCommandAddArgFormat(cmd, "%d", handshakefd);
|
||||||
virCommandAddArg(cmd, "--background");
|
virCommandAddArg(cmd, "--background");
|
||||||
|
|
||||||
for (i = 0 ; i < nveths ; i++) {
|
for (i = 0; i < nveths; i++) {
|
||||||
virCommandAddArgList(cmd, "--veth", veths[i], NULL);
|
virCommandAddArgList(cmd, "--veth", veths[i], NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1131,7 +1131,7 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
for (i = 0 ; i < vm->def->nconsoles ; i++)
|
for (i = 0; i < vm->def->nconsoles; i++)
|
||||||
ttyFDs[i] = -1;
|
ttyFDs[i] = -1;
|
||||||
|
|
||||||
/* If you are using a SecurityDriver with dynamic labelling,
|
/* If you are using a SecurityDriver with dynamic labelling,
|
||||||
@ -1152,7 +1152,7 @@ int virLXCProcessStart(virConnectPtr conn,
|
|||||||
vm->def, NULL) < 0)
|
vm->def, NULL) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
for (i = 0 ; i < vm->def->nconsoles ; i++) {
|
for (i = 0; i < vm->def->nconsoles; i++) {
|
||||||
char *ttyPath;
|
char *ttyPath;
|
||||||
if (vm->def->consoles[i]->source.type != VIR_DOMAIN_CHR_TYPE_PTY) {
|
if (vm->def->consoles[i]->source.type != VIR_DOMAIN_CHR_TYPE_PTY) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
@ -1334,7 +1334,7 @@ cleanup:
|
|||||||
virReportSystemError(errno, "%s", _("could not close logfile"));
|
virReportSystemError(errno, "%s", _("could not close logfile"));
|
||||||
rc = -1;
|
rc = -1;
|
||||||
}
|
}
|
||||||
for (i = 0 ; i < nveths ; i++) {
|
for (i = 0; i < nveths; i++) {
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
ignore_value(virNetDevVethDelete(veths[i]));
|
ignore_value(virNetDevVethDelete(veths[i]));
|
||||||
VIR_FREE(veths[i]);
|
VIR_FREE(veths[i]);
|
||||||
@ -1361,7 +1361,7 @@ cleanup:
|
|||||||
VIR_FREE(vm->def->seclabels[0]->imagelabel);
|
VIR_FREE(vm->def->seclabels[0]->imagelabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (i = 0 ; i < nttyFDs ; i++)
|
for (i = 0; i < nttyFDs; i++)
|
||||||
VIR_FORCE_CLOSE(ttyFDs[i]);
|
VIR_FORCE_CLOSE(ttyFDs[i]);
|
||||||
VIR_FREE(ttyFDs);
|
VIR_FREE(ttyFDs);
|
||||||
VIR_FORCE_CLOSE(handshakefds[0]);
|
VIR_FORCE_CLOSE(handshakefds[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user