Add virConnectGetLibvirtVersion API

There is currently no way to determine the libvirt version of a remote
libvirtd we are connected to. This is a useful piece of data to enable
feature detection.
This commit is contained in:
Cole Robinson
2009-11-12 10:53:26 -05:00
parent 632be33689
commit ce4c0bf5a2
25 changed files with 175 additions and 2 deletions

View File

@@ -258,6 +258,26 @@ remoteDispatchGetVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
return 0;
}
static int
remoteDispatchGetLibVersion (struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,
virConnectPtr conn,
remote_message_header *hdr ATTRIBUTE_UNUSED,
remote_error *rerr,
void *args ATTRIBUTE_UNUSED,
remote_get_lib_version_ret *ret)
{
unsigned long libVer;
if (virConnectGetLibVersion (conn, &libVer) == -1) {
remoteDispatchConnError(rerr, conn);
return -1;
}
ret->lib_ver = libVer;
return 0;
}
static int
remoteDispatchGetHostname (struct qemud_server *server ATTRIBUTE_UNUSED,
struct qemud_client *client ATTRIBUTE_UNUSED,