diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2010-03-22 18:44:58 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2010-03-26 14:17:35 +0000 |
commit | ab952024f42726a291d2c0ceda10071b88da7533 (patch) | |
tree | 1c6569696c1c8eae0c5770287df749baae9d482f /src/internal.h | |
parent | c85f641390a45d23d9fca5ec60a4bc49bfc5021d (diff) | |
download | libvirt-ab952024f42726a291d2c0ceda10071b88da7533.tar.gz |
Implement VNC password change in QEMU
Use the new virDomainUpdateDeviceFlags API to allow the VNC password
to be changed on the fly
* src/internal.h: Define STREQ_NULLABLE() which is like STREQ()
but does not crash if either argument is NULL, and treats two
NULLs as equal.
* src/libvirt_private.syms: Export virDomainGraphicsTypeToString
* src/qemu/qemu_driver.c: Support VNC password change on a live
machine
* src/qemu/qemu_monitor.c: Disable crazy debugging info. Treat a
NULL password as "" (empty string), allowing passwords to be
disabled in the monitor
Diffstat (limited to 'src/internal.h')
-rw-r--r-- | src/internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/internal.h b/src/internal.h index 4ec6edcda2..f82fbd2533 100644 --- a/src/internal.h +++ b/src/internal.h @@ -58,6 +58,12 @@ # define STRCASENEQLEN(a,b,n) (strncasecmp(a,b,n) != 0) # define STRPREFIX(a,b) (strncmp(a,b,strlen(b)) == 0) +# define STREQ_NULLABLE(a, b) \ + ((!(a) && !(b)) || ((a) && (b) && STREQ((a), (b)))) +# define STRNEQ_NULLABLE(a, b) \ + ((!(a) ^ !(b)) || ((a) && (b) && STRNEQ((a), (b)))) + + # define NUL_TERMINATE(buf) do { (buf)[sizeof(buf)-1] = '\0'; } while (0) # define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array)) |