提交 a9fd4768 编写于 作者: D Daniel P. Berrange

Added a port='...' attribute to <graphics> tag for VNC displays. Initially hardcoded to domid+5900

上级 345c959d
Mon Aug 7 11:06:20 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Added a 'port' attribute to the '<graphics>'
tag when display type is VNC, providing the port number on which
the VNC server is listening.
Mon Aug 7 18:47:48 CEST 2006 Daniel Veillard <veillard@redhat.com> Mon Aug 7 18:47:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt/libvirt.h.in: previous change to libvirt.h should * include/libvirt/libvirt.h.in: previous change to libvirt.h should
......
...@@ -1598,13 +1598,12 @@ xend_parse_sexp_desc(struct sexpr *root) ...@@ -1598,13 +1598,12 @@ xend_parse_sexp_desc(struct sexpr *root)
if (hvm) { if (hvm) {
/* Graphics device */ /* Graphics device */
/* TODO:
* Support for some additional attributes for graphics device?
*/
tmp = sexpr_node(root, "domain/image/hvm/vnc"); tmp = sexpr_node(root, "domain/image/hvm/vnc");
/* XXX extract VNC port from XenStore if its available */
if (tmp != NULL) { if (tmp != NULL) {
if (tmp[0] == '1') if (tmp[0] == '1')
virBufferAdd(&buf, " <graphics type='vnc'/>\n", 27 ); virBufferVSprintf(&buf, " <graphics type='vnc' port='%d'/>\n",
5900 + sexpr_int(root, "domain/domid"));
} }
tmp = sexpr_node(root, "domain/image/hvm/sdl"); tmp = sexpr_node(root, "domain/image/hvm/sdl");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册