diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2012-12-04 15:50:20 +0000 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2012-12-04 15:50:20 +0000 |
commit | 9a8913176113eacff0f236c247d6e1bb244afdd9 (patch) | |
tree | 65bd477bd1a6ea7f21e79ef3d47ae01c632ff313 /tools | |
parent | 37b52a8d58023c060a08b956d6c87215fd670222 (diff) | |
download | xen-9a8913176113eacff0f236c247d6e1bb244afdd9.tar.gz xen-9a8913176113eacff0f236c247d6e1bb244afdd9.tar.bz2 xen-9a8913176113eacff0f236c247d6e1bb244afdd9.zip |
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@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxl/xl_cmdimpl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 5d444a88d6..4b75fc3d66 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -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); |