virTimeBackOffVar timebackoff;
const unsigned long long timeout = 500 * 1000; /* ms */
VIR_AUTOCLOSE errfd = -1;
- int exitstatus = 0;
pid_t cpid = -1;
int ret = -1;
virCommandDaemonize(cmd);
virCommandAddArgFormat(cmd, "--config-file=%s", configfile);
- if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus) < 0)
+ if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, NULL) < 0)
goto cleanup;
- if (exitstatus != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not start dbus-daemon. exitstatus: %d"), exitstatus);
- goto cleanup;
- }
-
if (virPidFileReadPath(pidfile, &cpid) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("dbus-daemon %s didn't show up"),
g_autofree char *passtSocketName = qemuPasstCreateSocketPath(vm, net);
g_autoptr(virCommand) cmd = NULL;
g_autofree char *pidfile = qemuPasstCreatePidFilename(vm, net);
- g_autofree char *errbuf = NULL;
char macaddr[VIR_MAC_STRING_BUFLEN];
size_t i;
- int exitstatus = 0;
cmd = virCommandNew(PASST);
virCommandClearCaps(cmd);
- virCommandSetErrorBuffer(cmd, &errbuf);
virCommandAddArgList(cmd,
"--one-off",
if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0)
return -1;
- if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus) < 0)
+ if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, NULL) < 0)
goto error;
- if (exitstatus != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not start 'passt': %s"), NULLSTR(errbuf));
- goto error;
- }
-
return 0;
error:
* @cmd: the command to run
* @uid: the uid to force
* @gid: the gid to force
- * @existstatus: pointer to int returning exit status of process
+ * @existstatus: optional pointer to int returning exit status of process
*
* Run @cmd with seclabels set on it. If @uid and/or @gid are not
* -1 then their value is enforced.
size_t i;
pid_t pid = (pid_t) -1;
int rc;
- int exitstatus = 0;
bool killDBusDaemon = false;
g_autofree char *fdname = g_strdup_printf("slirpfd-%s", net->info.alias);
if (qemuExtDeviceLogCommand(driver, vm, cmd, "slirp") < 0)
goto error;
- if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus) < 0)
+ if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, NULL) < 0)
goto error;
- if (exitstatus != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not start 'slirp'. exitstatus: %d"), exitstatus);
- goto error;
- }
-
rc = virPidFileReadPath(pidfile, &pid);
if (rc < 0) {
virReportSystemError(-rc,
g_autoptr(virCommand) cmd = NULL;
int pair[2] = { -1, -1 };
int rc;
- int exitstatus = 0;
pid_t pid;
int ret = -1;
virCommandAddArgFormat(cmd, "--render-node=%s", video->accel->rendernode);
}
- if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus) < 0)
+ if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, NULL) < 0)
goto error;
- if (exitstatus != 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not start 'vhost-user-gpu'. exitstatus: %d"), exitstatus);
- goto cleanup;
- }
-
rc = virPidFileReadPath(pidfile, &pid);
if (rc < 0) {
virReportSystemError(-rc,