提交 c53acd2a 编写于 作者: C Cole Robinson

Drop needless virtType validation

This code originates from:

commit d0aa10fd
Author: Daniel P. Berrange <berrange@redhat.com>
Date:   Tue Mar 3 12:03:44 2009 +0000

    QEMU security driver usage for sVirt support (James Morris, Dan Walsh, Daniel Berrange)

Originally in the qemudDomainGetSecurityLabel function. It doesn't
appear to have done anything useful back then either. The other two
instances look like copy+paste
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NCole Robinson <crobinso@redhat.com>
上级 2e556e00
...@@ -1268,13 +1268,6 @@ static int lxcDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr secla ...@@ -1268,13 +1268,6 @@ static int lxcDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr secla
if (virDomainGetSecurityLabelEnsureACL(dom->conn, vm->def) < 0) if (virDomainGetSecurityLabelEnsureACL(dom->conn, vm->def) < 0)
goto cleanup; goto cleanup;
if (!virDomainVirtTypeToString(vm->def->virtType)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown virt type in domain definition '%d'"),
vm->def->virtType);
goto cleanup;
}
/* /*
* Theoretically, the pid can be replaced during this operation and * Theoretically, the pid can be replaced during this operation and
* return the label of a different process. If atomicity is needed, * return the label of a different process. If atomicity is needed,
......
...@@ -6445,13 +6445,6 @@ static int qemuDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr secl ...@@ -6445,13 +6445,6 @@ static int qemuDomainGetSecurityLabel(virDomainPtr dom, virSecurityLabelPtr secl
if (virDomainGetSecurityLabelEnsureACL(dom->conn, vm->def) < 0) if (virDomainGetSecurityLabelEnsureACL(dom->conn, vm->def) < 0)
goto cleanup; goto cleanup;
if (!virDomainVirtTypeToString(vm->def->virtType)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown virt type in domain definition '%d'"),
vm->def->virtType);
goto cleanup;
}
/* /*
* Theoretically, the pid can be replaced during this operation and * Theoretically, the pid can be replaced during this operation and
* return the label of a different process. If atomicity is needed, * return the label of a different process. If atomicity is needed,
...@@ -6493,13 +6486,6 @@ static int qemuDomainGetSecurityLabelList(virDomainPtr dom, ...@@ -6493,13 +6486,6 @@ static int qemuDomainGetSecurityLabelList(virDomainPtr dom,
if (virDomainGetSecurityLabelListEnsureACL(dom->conn, vm->def) < 0) if (virDomainGetSecurityLabelListEnsureACL(dom->conn, vm->def) < 0)
goto cleanup; goto cleanup;
if (!virDomainVirtTypeToString(vm->def->virtType)) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("unknown virt type in domain definition '%d'"),
vm->def->virtType);
goto cleanup;
}
/* /*
* Check the comment in qemuDomainGetSecurityLabel function. * Check the comment in qemuDomainGetSecurityLabel function.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册