virCommandAddArg(cmd, device);
- if (virCommandRun(cmd, NULL) < 0) {
- virReportSystemError(errno,
- _("Failed to make filesystem of "
- "type '%s' on device '%s'"),
- format, device);
+ if (virCommandRun(cmd, NULL) < 0)
return -1;
- }
return 0;
}
virCommandSetOutputBuffer(cmd, &version);
virCommandAddEnvPassCommon(cmd);
virCommandClearCaps(cmd);
- if (virCommandRun(cmd, NULL) < 0) {
- virReportSystemError(errno, _("failed to run '%s --version': %s"),
- caps->binaryPath, version);
+ if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
- }
virCommandFree(cmd);
cmd = virCommandNewArgList(caps->binaryPath, "--help", NULL);
virCommandSetOutputBuffer(cmd, &help);
virCommandAddEnvPassCommon(cmd);
virCommandClearCaps(cmd);
- if (virCommandRun(cmd, NULL) < 0) {
- virReportSystemError(errno, _("failed to run '%s --help': %s"),
- caps->binaryPath, help);
+ if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
- }
if (virAsprintf(&complete, "%s\n%s", version, help) < 0)
goto cleanup;