cleanup:
VIR_FREE(loname);
if (ret < 0)
- VIR_FORCE_CLOSE(lofd);
+ VIR_FORCE_CLOSE(lofd);
return lofd;
len = &console->fromContLen;
avail = sizeof(console->fromContBuf) - *len;
}
- reread:
+ reread:
done = read(fd, buf + *len, avail);
if (done == -1 && errno == EINTR)
goto reread;
len = &console->fromHostLen;
}
- rewrite:
+ rewrite:
done = write(fd, buf, *len);
if (done == -1 && errno == EINTR)
goto rewrite;
virDomainHostdevCaps hdcaps = hdev->source.caps;
if (hdcaps.type != VIR_DOMAIN_HOSTDEV_CAPS_TYPE_NET)
- continue;
+ continue;
if (virNetDevSetNamespace(hdcaps.u.net.iface, ctrl->initpid) < 0)
return -1;
* anything other than 0, but let's play it safe. */
if ((virAsprintf(ttyName, "/dev/pts/%d", ptyno) < 0) ||
(virAsprintf(ttyHostPath, "/%s/%s.devpts/%d", LXC_STATE_DIR,
- ctrl->def->name, ptyno) < 0)) {
+ ctrl->def->name, ptyno) < 0)) {
errno = ENOMEM;
goto cleanup;
}
if ((lxcContainerChown(ctrl->def, ctrl->devptmx) < 0) ||
(lxcContainerChown(ctrl->def, devpts) < 0))
- goto cleanup;
+ goto cleanup;
ret = 0;
&ctrl->consoles[i].contFd,
&containerTTYPaths[i], &ttyHostPath) < 0) {
virReportSystemError(errno, "%s",
- _("Failed to allocate tty"));
+ _("Failed to allocate tty"));
goto cleanup;
}
int c;
c = getopt_long(argc, argv, "dn:v:p:m:c:s:h:S:",
- options, NULL);
+ options, NULL);
if (c == -1)
break;
case 1:
if (!info->pass) {
VIR_TEST_VERBOSE("should not remove from non-object %s\n",
- info->doc);
+ info->doc);
goto cleanup;
}
break;
goto cleanup;
default:
VIR_TEST_VERBOSE("unexpected result when removing from %s\n",
- info->doc);
+ info->doc);
goto cleanup;
}
if (STRNEQ_NULLABLE(virJSONValueGetString(name), "sample")) {
VIR_TEST_VERBOSE("unexpected value after removing name: %s\n",
- NULLSTR(virJSONValueGetString(name)));
+ NULLSTR(virJSONValueGetString(name)));
goto cleanup;
}
if (virJSONValueObjectRemoveKey(json, "name", NULL)) {
VIR_TEST_VERBOSE("%s",
- "unexpected success when removing missing key\n");
+ "unexpected success when removing missing key\n");
goto cleanup;
}
if (virJSONValueObjectAppendString(json, "newname", "foo") < 0) {
DO_TEST_PARSE("Simple", "{\"return\": {}, \"id\": \"libvirt-1\"}");
DO_TEST_PARSE("NotSoSimple", "{\"QMP\": {\"version\": {\"qemu\":"
- "{\"micro\": 91, \"minor\": 13, \"major\": 0},"
- "\"package\": \" (qemu-kvm-devel)\"}, \"capabilities\": []}}");
+ "{\"micro\": 91, \"minor\": 13, \"major\": 0},"
+ "\"package\": \" (qemu-kvm-devel)\"}, \"capabilities\": []}}");
DO_TEST_PARSE("Harder", "{\"return\": [{\"filename\": "