提交 0c62b5f6 编写于 作者: D Daniel P. Berrange

Added implementation of GetOSType driver to test backend

上级 892a8c38
Wed Nov 8 13:00:56 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/test.c, src/test.h: Added implementation of the virDomainGetOSType
driver method to the test hypervisor backend.
Wed Nov 8 16:58:56 CET 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt/virterror.h src/virterror.c src/xend_internal.c
......
......@@ -47,7 +47,7 @@ static virDriver testDriver = {
NULL, /* domainGetName */
NULL, /* domainGetID */
NULL, /* domainGetUUID */
NULL, /* domainGetOSType */
testGetOSType, /* domainGetOSType */
testGetMaxMemory, /* domainGetMaxMemory */
testSetMaxMemory, /* domainSetMaxMemory */
testSetMemory, /* domainSetMemory */
......@@ -989,6 +989,10 @@ int testGetDomainInfo (virDomainPtr domain,
return (0);
}
char *testGetOSType(virDomainPtr dom ATTRIBUTE_UNUSED) {
return strdup("linux");
}
unsigned long testGetMaxMemory(virDomainPtr domain) {
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
......
......@@ -30,6 +30,7 @@ int testNumOfDomains(virConnectPtr conn);
int testListDomains(virConnectPtr conn,
int *ids,
int maxids);
char *testGetOSType(virDomainPtr dom);
virDomainPtr
testDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
unsigned int flags ATTRIBUTE_UNUSED);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册