mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
qemu_process: Rename identifiers moved from qemu_capabilities
s/virQEMUCapsInitQMPCommand/qemuProcessQMP/ Signed-off-by: Chris Venteicher <cventeic@redhat.com> Reviewed-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
16058045d0
commit
3bdb6e826f
@ -4361,15 +4361,15 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
|
||||
gid_t runGid,
|
||||
char **qmperr)
|
||||
{
|
||||
virQEMUCapsInitQMPCommandPtr cmd = NULL;
|
||||
qemuProcessQMPPtr cmd = NULL;
|
||||
int ret = -1;
|
||||
int rc;
|
||||
|
||||
if (!(cmd = virQEMUCapsInitQMPCommandNew(qemuCaps->binary, libDir,
|
||||
runUid, runGid, qmperr)))
|
||||
if (!(cmd = qemuProcessQMPNew(qemuCaps->binary, libDir,
|
||||
runUid, runGid, qmperr)))
|
||||
goto cleanup;
|
||||
|
||||
if ((rc = virQEMUCapsInitQMPCommandRun(cmd, false)) != 0) {
|
||||
if ((rc = qemuProcessQMPRun(cmd, false)) != 0) {
|
||||
if (rc == 1)
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
@ -4379,8 +4379,8 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
|
||||
goto cleanup;
|
||||
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM)) {
|
||||
virQEMUCapsInitQMPCommandAbort(cmd);
|
||||
if ((rc = virQEMUCapsInitQMPCommandRun(cmd, true)) != 0) {
|
||||
qemuProcessQMPAbort(cmd);
|
||||
if ((rc = qemuProcessQMPRun(cmd, true)) != 0) {
|
||||
if (rc == 1)
|
||||
ret = 0;
|
||||
goto cleanup;
|
||||
@ -4393,7 +4393,7 @@ virQEMUCapsInitQMP(virQEMUCapsPtr qemuCaps,
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
virQEMUCapsInitQMPCommandFree(cmd);
|
||||
qemuProcessQMPFree(cmd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -8325,12 +8325,12 @@ static qemuMonitorCallbacks callbacks = {
|
||||
|
||||
|
||||
void
|
||||
virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd)
|
||||
qemuProcessQMPFree(qemuProcessQMPPtr cmd)
|
||||
{
|
||||
if (!cmd)
|
||||
return;
|
||||
|
||||
virQEMUCapsInitQMPCommandAbort(cmd);
|
||||
qemuProcessQMPAbort(cmd);
|
||||
VIR_FREE(cmd->binary);
|
||||
VIR_FREE(cmd->monpath);
|
||||
VIR_FREE(cmd->monarg);
|
||||
@ -8339,14 +8339,14 @@ virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd)
|
||||
}
|
||||
|
||||
|
||||
virQEMUCapsInitQMPCommandPtr
|
||||
virQEMUCapsInitQMPCommandNew(char *binary,
|
||||
const char *libDir,
|
||||
uid_t runUid,
|
||||
gid_t runGid,
|
||||
char **qmperr)
|
||||
qemuProcessQMPPtr
|
||||
qemuProcessQMPNew(char *binary,
|
||||
const char *libDir,
|
||||
uid_t runUid,
|
||||
gid_t runGid,
|
||||
char **qmperr)
|
||||
{
|
||||
virQEMUCapsInitQMPCommandPtr cmd = NULL;
|
||||
qemuProcessQMPPtr cmd = NULL;
|
||||
|
||||
if (VIR_ALLOC(cmd) < 0)
|
||||
goto error;
|
||||
@ -8385,7 +8385,7 @@ virQEMUCapsInitQMPCommandNew(char *binary,
|
||||
return cmd;
|
||||
|
||||
error:
|
||||
virQEMUCapsInitQMPCommandFree(cmd);
|
||||
qemuProcessQMPFree(cmd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -8395,8 +8395,8 @@ virQEMUCapsInitQMPCommandNew(char *binary,
|
||||
* 1 when probing QEMU failed
|
||||
*/
|
||||
int
|
||||
virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
||||
bool forceTCG)
|
||||
qemuProcessQMPRun(qemuProcessQMPPtr cmd,
|
||||
bool forceTCG)
|
||||
{
|
||||
virDomainXMLOptionPtr xmlopt = NULL;
|
||||
const char *machine;
|
||||
@ -8474,7 +8474,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
||||
|
||||
cleanup:
|
||||
if (!cmd->mon)
|
||||
virQEMUCapsInitQMPCommandAbort(cmd);
|
||||
qemuProcessQMPAbort(cmd);
|
||||
virObjectUnref(xmlopt);
|
||||
|
||||
return ret;
|
||||
@ -8486,7 +8486,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
||||
|
||||
|
||||
void
|
||||
virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd)
|
||||
qemuProcessQMPAbort(qemuProcessQMPPtr cmd)
|
||||
{
|
||||
if (cmd->mon)
|
||||
virObjectUnlock(cmd->mon);
|
||||
|
@ -214,9 +214,9 @@ int qemuProcessStartManagedPRDaemon(virDomainObjPtr vm);
|
||||
|
||||
void qemuProcessKillManagedPRDaemon(virDomainObjPtr vm);
|
||||
|
||||
typedef struct _virQEMUCapsInitQMPCommand virQEMUCapsInitQMPCommand;
|
||||
typedef virQEMUCapsInitQMPCommand *virQEMUCapsInitQMPCommandPtr;
|
||||
struct _virQEMUCapsInitQMPCommand {
|
||||
typedef struct _qemuProcessQMP qemuProcessQMP;
|
||||
typedef qemuProcessQMP *qemuProcessQMPPtr;
|
||||
struct _qemuProcessQMP {
|
||||
char *binary;
|
||||
uid_t runUid;
|
||||
gid_t runGid;
|
||||
@ -231,17 +231,17 @@ struct _virQEMUCapsInitQMPCommand {
|
||||
virDomainObjPtr vm;
|
||||
};
|
||||
|
||||
virQEMUCapsInitQMPCommandPtr virQEMUCapsInitQMPCommandNew(char *binary,
|
||||
const char *libDir,
|
||||
uid_t runUid,
|
||||
gid_t runGid,
|
||||
char **qmperr);
|
||||
qemuProcessQMPPtr qemuProcessQMPNew(char *binary,
|
||||
const char *libDir,
|
||||
uid_t runUid,
|
||||
gid_t runGid,
|
||||
char **qmperr);
|
||||
|
||||
void virQEMUCapsInitQMPCommandFree(virQEMUCapsInitQMPCommandPtr cmd);
|
||||
void qemuProcessQMPFree(qemuProcessQMPPtr cmd);
|
||||
|
||||
int virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
|
||||
bool forceTCG);
|
||||
int qemuProcessQMPRun(qemuProcessQMPPtr cmd,
|
||||
bool forceTCG);
|
||||
|
||||
void virQEMUCapsInitQMPCommandAbort(virQEMUCapsInitQMPCommandPtr cmd);
|
||||
void qemuProcessQMPAbort(qemuProcessQMPPtr cmd);
|
||||
|
||||
#endif /* LIBVIRT_QEMU_PROCESS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user