提交 3bdb6e82 编写于 作者: C Chris Venteicher 提交者: Jiri Denemark

qemu_process: Rename identifiers moved from qemu_capabilities

s/virQEMUCapsInitQMPCommand/qemuProcessQMP/
Signed-off-by: NChris Venteicher <cventeic@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 16058045
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册