On Thu, Oct 31, 2013 at 01:07:26PM +0100, Ján Tomko wrote:
This allows its error messages to be more specific.
---
src/libxl/libxl_driver.c | 3 ++-
src/qemu/qemu_driver.c | 9 ++++++---
src/util/virportallocator.c | 9 +++++++--
src/util/virportallocator.h | 3 ++-
tests/virportallocatortest.c | 4 ++--
5 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 4928695..a166689 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -834,7 +834,8 @@ libxlStateInitialize(bool privileged,
/* Allocate bitmap for vnc port reservation */
if (!(libxl_driver->reservedVNCPorts =
- virPortAllocatorNew(LIBXL_VNC_PORT_MIN,
+ virPortAllocatorNew("VNC",
+ LIBXL_VNC_PORT_MIN,
LIBXL_VNC_PORT_MAX)))
goto error;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 9c3daad..9dc887f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -678,17 +678,20 @@ qemuStateInitialize(bool privileged,
* do this before the config is loaded properly, since the port
* numbers are configurable now */
if ((qemu_driver->remotePorts =
- virPortAllocatorNew(cfg->remotePortMin,
+ virPortAllocatorNew("display",
+ cfg->remotePortMin,
cfg->remotePortMax)) == NULL)
goto error;
if ((qemu_driver->webSocketPorts =
- virPortAllocatorNew(cfg->webSocketPortMin,
+ virPortAllocatorNew("webSocket",
+ cfg->webSocketPortMin,
cfg->webSocketPortMax)) == NULL)
goto error;
if ((qemu_driver->migrationPorts =
- virPortAllocatorNew(cfg->migrationPortMin,
+ virPortAllocatorNew("migration",
+ cfg->migrationPortMin,
cfg->migrationPortMax)) == NULL)
goto error;
Probably need to mark these for translation.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|