|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xl: Check for duplicate vncdisplay options, and return an error
# HG changeset patch
# User George Dunlap <george.dunlap@xxxxxxxxxxxxx>
# Date 1354636220 0
# Node ID eb2394c97d57939da0e810f3f86a948ea56580e2
# Parent 36d5d8ee5643e49ca205704a2999a5b2df4b8fd6
xl: Check for duplicate vncdisplay options, and return an error
If the user has set a vnc display number both in vnclisten (with
"xxxx:yy"), and with vncdisplay, throw an error.
Update man pages to match.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 36d5d8ee5643 -r eb2394c97d57 docs/man/xl.cfg.pod.5
--- a/docs/man/xl.cfg.pod.5 Tue Dec 04 15:50:19 2012 +0000
+++ b/docs/man/xl.cfg.pod.5 Tue Dec 04 15:50:20 2012 +0000
@@ -350,11 +350,17 @@ other VNC-related settings. The default
Specifies the IP address, and optionally VNC display number, to use.
+NB that if you specify the display number here, you should not use
+vncdisplay.
+
=item C<vncdisplay=DISPLAYNUM>
Specifies the VNC display number to use. The actual TCP port number
will be DISPLAYNUM+5900.
+NB that you should not use this option if you set the displaynum in the
+vnclisten string.
+
=item C<vncunused=BOOLEAN>
Requests that the VNC display setup search for a free TCP port to use.
diff -r 36d5d8ee5643 -r eb2394c97d57 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Tue Dec 04 15:50:19 2012 +0000
+++ b/tools/libxl/xl_cmdimpl.c Tue Dec 04 15:50:20 2012 +0000
@@ -1257,6 +1257,7 @@ skip_nic:
vfb->sdl.xauthority = strdup(p2 + 1);
}
} while ((p = strtok(NULL, ",")) != NULL);
+
skip_vfb:
free(buf2);
d_config->num_vfbs++;
@@ -1490,6 +1491,16 @@ skip_vfb:
xlu_cfg_replace_string (config, "soundhw", &b_info->u.hvm.soundhw, 0);
xlu_cfg_get_defbool(config, "xen_platform_pci",
&b_info->u.hvm.xen_platform_pci, 0);
+
+ if(b_info->u.hvm.vnc.listen
+ && b_info->u.hvm.vnc.display
+ && strchr(b_info->u.hvm.vnc.listen, ':') != NULL) {
+ fprintf(stderr,
+ "ERROR: Display specified both in vnclisten"
+ " and vncdisplay!\n");
+ exit (1);
+
+ }
}
xlu_cfg_destroy(config);
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |