Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
955f1203
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
955f1203
编写于
3月 06, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added support for keymap in VNC display
上级
8cb208cd
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
76 addition
and
38 deletion
+76
-38
AUTHORS
AUTHORS
+2
-1
ChangeLog
ChangeLog
+8
-0
src/xend_internal.c
src/xend_internal.c
+13
-8
src/xm_internal.c
src/xm_internal.c
+27
-13
src/xml.c
src/xml.c
+10
-0
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
+1
-1
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
+1
-1
tests/sexpr2xmldata/sexpr2xml-fv.sexpr
tests/sexpr2xmldata/sexpr2xml-fv.sexpr
+1
-1
tests/sexpr2xmldata/sexpr2xml-fv.xml
tests/sexpr2xmldata/sexpr2xml-fv.xml
+1
-1
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
+1
-1
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
+1
-1
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
+1
-1
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
+1
-1
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
+1
-1
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
+1
-1
tests/xml2sexprdata/xml2sexpr-fv-vncunused.xml
tests/xml2sexprdata/xml2sexpr-fv-vncunused.xml
+1
-1
tests/xml2sexprdata/xml2sexpr-fv.xml
tests/xml2sexprdata/xml2sexpr-fv.xml
+1
-1
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
+1
-1
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
+1
-1
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
+1
-1
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
+1
-1
未找到文件。
AUTHORS
浏览文件 @
955f1203
...
@@ -5,7 +5,7 @@ The libvirt project was initiated by:
...
@@ -5,7 +5,7 @@ The libvirt project was initiated by:
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
The primary maintainers for various code sub-systems / drivers
The primary maintainers for various code sub-systems / drivers
are:
are:
Daniel Veillard <veillard@redhat.com> (xen & everything else)
Daniel Veillard <veillard@redhat.com> (xen & everything else)
...
@@ -30,6 +30,7 @@ Patches have also been contributed by:
...
@@ -30,6 +30,7 @@ Patches have also been contributed by:
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
Takahashi Tomohiro <takatom@jp.fujitsu.com>
[....send patches to get your name here....]
[....send patches to get your name here....]
...
...
ChangeLog
浏览文件 @
955f1203
Tue Mar 06 14:21:12 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/xend_internal.c, src/xml.c, src/xm_internal.c: Support
the 'keymap' attribute for VNC configuration. Based on patch
signed off by: Takahashi Tomohiro
* tests/sexpr2xmldata/, tests/xml2sexprdata/: Update to test
handling of keymap attribute
Tue Mar 06 11:47:12 EST 2007 Daniel P. Berrange <berrange@redhat.com>
Tue Mar 06 11:47:12 EST 2007 Daniel P. Berrange <berrange@redhat.com>
* src/qemud.c: Unlink read-only socket upon startup (patch
* src/qemud.c: Unlink read-only socket upon startup (patch
...
...
src/xend_internal.c
浏览文件 @
955f1203
...
@@ -1587,11 +1587,13 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1587,11 +1587,13 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
else
if
(
tmp
&&
!
strcmp
(
tmp
,
"vnc"
))
{
}
else
if
(
tmp
&&
!
strcmp
(
tmp
,
"vnc"
))
{
int
port
=
xenStoreDomainGetVNCPort
(
conn
,
domid
);
int
port
=
xenStoreDomainGetVNCPort
(
conn
,
domid
);
const
char
*
listenAddr
=
sexpr_node
(
node
,
"device/vfb/vnclisten"
);
const
char
*
listenAddr
=
sexpr_node
(
node
,
"device/vfb/vnclisten"
);
if
(
listenAddr
)
{
const
char
*
keymap
=
sexpr_node
(
node
,
"device/vfb/keymap"
);
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d' listen='%s'/>
\n
"
,
port
,
listenAddr
);
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d'"
,
port
);
}
else
{
if
(
listenAddr
)
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d'/>
\n
"
,
port
);
virBufferVSprintf
(
&
buf
,
" listen='%s'"
,
listenAddr
);
}
if
(
keymap
)
virBufferVSprintf
(
&
buf
,
" keymap='%s'"
,
keymap
);
virBufferAdd
(
&
buf
,
"/>
\n
"
,
3
);
}
}
}
}
}
}
...
@@ -1632,6 +1634,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1632,6 +1634,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
if
(
tmp
[
0
]
==
'1'
)
{
if
(
tmp
[
0
]
==
'1'
)
{
int
port
=
xenStoreDomainGetVNCPort
(
conn
,
domid
);
int
port
=
xenStoreDomainGetVNCPort
(
conn
,
domid
);
const
char
*
listenAddr
=
sexpr_fmt_node
(
root
,
"domain/image/%s/vnclisten"
,
hvm
?
"hvm"
:
"linux"
);
const
char
*
listenAddr
=
sexpr_fmt_node
(
root
,
"domain/image/%s/vnclisten"
,
hvm
?
"hvm"
:
"linux"
);
const
char
*
keymap
=
sexpr_fmt_node
(
root
,
"domain/image/%s/keymap"
,
hvm
?
"hvm"
:
"linux"
);
/* For Xen >= 3.0.3, don't generate a fixed port mapping
/* For Xen >= 3.0.3, don't generate a fixed port mapping
* because it will almost certainly be wrong ! Just leave
* because it will almost certainly be wrong ! Just leave
* it as -1 which lets caller see that the VNC server isn't
* it as -1 which lets caller see that the VNC server isn't
...
@@ -1640,10 +1643,12 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1640,10 +1643,12 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
*/
*/
if
(
port
==
-
1
&&
xendConfigVersion
<
2
)
if
(
port
==
-
1
&&
xendConfigVersion
<
2
)
port
=
5900
+
domid
;
port
=
5900
+
domid
;
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d'"
,
port
);
if
(
listenAddr
)
if
(
listenAddr
)
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d' listen='%s'/>
\n
"
,
port
,
listenAddr
);
virBufferVSprintf
(
&
buf
,
" listen='%s'"
,
listenAddr
);
else
if
(
keymap
)
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d'/>
\n
"
,
port
);
virBufferVSprintf
(
&
buf
,
" keymap='%s'"
,
keymap
);
virBufferAdd
(
&
buf
,
"/>
\n
"
,
3
);
}
}
}
}
...
...
src/xm_internal.c
浏览文件 @
955f1203
...
@@ -579,6 +579,7 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -579,6 +579,7 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
long
vncunused
=
1
;
long
vncunused
=
1
;
const
char
*
vnclisten
=
NULL
;
const
char
*
vnclisten
=
NULL
;
const
char
*
vncpasswd
=
NULL
;
const
char
*
vncpasswd
=
NULL
;
const
char
*
keymap
=
NULL
;
if
(
xenXMConfigGetString
(
conf
,
"name"
,
&
name
)
<
0
)
if
(
xenXMConfigGetString
(
conf
,
"name"
,
&
name
)
<
0
)
return
(
NULL
);
return
(
NULL
);
...
@@ -890,6 +891,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -890,6 +891,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
vnclisten
=
NULL
;
vnclisten
=
NULL
;
if
(
xenXMConfigGetString
(
conf
,
"vncpasswd"
,
&
vncpasswd
)
<
0
)
if
(
xenXMConfigGetString
(
conf
,
"vncpasswd"
,
&
vncpasswd
)
<
0
)
vncpasswd
=
NULL
;
vncpasswd
=
NULL
;
if
(
xenXMConfigGetString
(
conf
,
"keymap"
,
&
keymap
)
<
0
)
keymap
=
NULL
;
}
}
if
(
xenXMConfigGetInt
(
conf
,
"sdl"
,
&
val
)
==
0
&&
val
)
if
(
xenXMConfigGetInt
(
conf
,
"sdl"
,
&
val
)
==
0
&&
val
)
sdl
=
1
;
sdl
=
1
;
...
@@ -924,6 +927,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -924,6 +927,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
vnclisten
=
key
+
10
;
vnclisten
=
key
+
10
;
}
else
if
(
!
strncmp
(
key
,
"vncpasswd="
,
10
))
{
}
else
if
(
!
strncmp
(
key
,
"vncpasswd="
,
10
))
{
vncpasswd
=
key
+
10
;
vncpasswd
=
key
+
10
;
}
else
if
(
!
strncmp
(
key
,
"keymap="
,
7
))
{
keymap
=
key
+
7
;
}
else
if
(
!
strncmp
(
key
,
"vncdisplay="
,
11
))
{
}
else
if
(
!
strncmp
(
key
,
"vncdisplay="
,
11
))
{
int
port
=
strtol
(
key
+
11
,
NULL
,
10
);
int
port
=
strtol
(
key
+
11
,
NULL
,
10
);
if
(
port
==
-
1
)
if
(
port
==
-
1
)
...
@@ -942,21 +947,19 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -942,21 +947,19 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
}
}
if
(
vnc
)
{
if
(
vnc
)
{
virBufferVSprintf
(
buf
,
" <graphics type='vnc' port='%d'"
,
(
vncunused
?
-
1
:
5900
+
vncdisplay
));
if
(
vnclisten
)
{
virBufferVSprintf
(
buf
,
" listen='%s'"
,
vnclisten
);
}
if
(
vncpasswd
)
{
if
(
vncpasswd
)
{
if
(
vnclisten
)
virBufferVSprintf
(
buf
,
" passwd='%s'"
,
vncpasswd
);
virBufferVSprintf
(
buf
,
" <graphics type='vnc' port='%d' listen='%s' passwd='%s'/>
\n
"
,
(
vncunused
?
-
1
:
5900
+
vncdisplay
),
vnclisten
,
vncpasswd
);
else
virBufferVSprintf
(
buf
,
" <graphics type='vnc' port='%d' passwd='%s'/>
\n
"
,
(
vncunused
?
-
1
:
5900
+
vncdisplay
),
vncpasswd
);
}
else
{
if
(
vnclisten
)
virBufferVSprintf
(
buf
,
" <graphics type='vnc' port='%d' listen='%s'/>
\n
"
,
(
vncunused
?
-
1
:
5900
+
vncdisplay
),
vnclisten
);
else
virBufferVSprintf
(
buf
,
" <graphics type='vnc' port='%d'/>
\n
"
,
(
vncunused
?
-
1
:
5900
+
vncdisplay
));
}
}
if
(
keymap
)
{
virBufferVSprintf
(
buf
,
" keymap='%s'"
,
keymap
);
}
virBufferAdd
(
buf
,
"/>
\n
"
,
3
);
}
}
if
(
sdl
)
{
if
(
sdl
)
{
virBufferAdd
(
buf
,
" <graphics type='sdl'/>
\n
"
,
-
1
);
virBufferAdd
(
buf
,
" <graphics type='sdl'/>
\n
"
,
-
1
);
...
@@ -1863,6 +1866,9 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
...
@@ -1863,6 +1866,9 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
if
(
xenXMConfigSetStringFromXPath
(
conn
,
conf
,
ctxt
,
"vncpasswd"
,
"string(/domain/devices/graphics[@type='vnc']/@passwd)"
,
1
,
if
(
xenXMConfigSetStringFromXPath
(
conn
,
conf
,
ctxt
,
"vncpasswd"
,
"string(/domain/devices/graphics[@type='vnc']/@passwd)"
,
1
,
"cannot set the vncpasswd parameter"
)
<
0
)
"cannot set the vncpasswd parameter"
)
<
0
)
goto
error
;
goto
error
;
if
(
xenXMConfigSetStringFromXPath
(
conn
,
conf
,
ctxt
,
"keymap"
,
"string(/domain/devices/graphics[@type='vnc']/@keymap)"
,
1
,
"cannot set the keymap parameter"
)
<
0
)
goto
error
;
/* XXX vncdisplay */
/* XXX vncdisplay */
/*
/*
...
@@ -1894,6 +1900,7 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
...
@@ -1894,6 +1900,7 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
xmlChar
*
vncport
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"port"
);
xmlChar
*
vncport
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"port"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"listen"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"listen"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"passwd"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"passwd"
);
xmlChar
*
keymap
=
xmlGetProp
(
obj
->
nodesetval
->
nodeTab
[
i
],
BAD_CAST
"keymap"
);
int
vncunused
=
vncport
?
(
!
strcmp
((
const
char
*
)
vncport
,
"-1"
)
?
1
:
0
)
:
1
;
int
vncunused
=
vncport
?
(
!
strcmp
((
const
char
*
)
vncport
,
"-1"
)
?
1
:
0
)
:
1
;
if
(
vncunused
)
if
(
vncunused
)
len
+=
12
;
len
+=
12
;
...
@@ -1903,6 +1910,8 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
...
@@ -1903,6 +1910,8 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
len
+=
11
+
strlen
((
const
char
*
)
vnclisten
);
len
+=
11
+
strlen
((
const
char
*
)
vnclisten
);
if
(
vncpasswd
)
if
(
vncpasswd
)
len
+=
11
+
strlen
((
const
char
*
)
vncpasswd
);
len
+=
11
+
strlen
((
const
char
*
)
vncpasswd
);
if
(
keymap
)
len
+=
8
+
strlen
((
const
char
*
)
keymap
);
if
((
val
=
malloc
(
len
))
!=
NULL
)
{
if
((
val
=
malloc
(
len
))
!=
NULL
)
{
strcpy
(
val
,
"type=vnc"
);
strcpy
(
val
,
"type=vnc"
);
if
(
vncunused
)
{
if
(
vncunused
)
{
...
@@ -1923,6 +1932,11 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
...
@@ -1923,6 +1932,11 @@ virConfPtr xenXMParseXMLToConfig(virConnectPtr conn, const char *xml) {
strcat
(
val
,
(
const
char
*
)
vncpasswd
);
strcat
(
val
,
(
const
char
*
)
vncpasswd
);
xmlFree
(
vncpasswd
);
xmlFree
(
vncpasswd
);
}
}
if
(
keymap
)
{
strcat
(
val
,
",keymap="
);
strcat
(
val
,
(
const
char
*
)
keymap
);
xmlFree
(
keymap
);
}
}
}
}
}
xmlFree
(
type
);
xmlFree
(
type
);
...
...
src/xml.c
浏览文件 @
955f1203
...
@@ -246,6 +246,7 @@ static int virDomainParseXMLGraphicsDescImage(virConnectPtr conn ATTRIBUTE_UNUSE
...
@@ -246,6 +246,7 @@ static int virDomainParseXMLGraphicsDescImage(virConnectPtr conn ATTRIBUTE_UNUSE
xmlChar
*
vncport
=
xmlGetProp
(
node
,
BAD_CAST
"port"
);
xmlChar
*
vncport
=
xmlGetProp
(
node
,
BAD_CAST
"port"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
node
,
BAD_CAST
"listen"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
node
,
BAD_CAST
"listen"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
node
,
BAD_CAST
"passwd"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
node
,
BAD_CAST
"passwd"
);
xmlChar
*
keymap
=
xmlGetProp
(
node
,
BAD_CAST
"keymap"
);
if
(
vncport
!=
NULL
)
{
if
(
vncport
!=
NULL
)
{
long
port
=
strtol
((
const
char
*
)
vncport
,
NULL
,
10
);
long
port
=
strtol
((
const
char
*
)
vncport
,
NULL
,
10
);
if
(
port
==
-
1
)
if
(
port
==
-
1
)
...
@@ -262,6 +263,10 @@ static int virDomainParseXMLGraphicsDescImage(virConnectPtr conn ATTRIBUTE_UNUSE
...
@@ -262,6 +263,10 @@ static int virDomainParseXMLGraphicsDescImage(virConnectPtr conn ATTRIBUTE_UNUSE
virBufferVSprintf
(
buf
,
"(vncpasswd %s)"
,
vncpasswd
);
virBufferVSprintf
(
buf
,
"(vncpasswd %s)"
,
vncpasswd
);
xmlFree
(
vncpasswd
);
xmlFree
(
vncpasswd
);
}
}
if
(
keymap
!=
NULL
)
{
virBufferVSprintf
(
buf
,
"(keymap %s)"
,
keymap
);
xmlFree
(
keymap
);
}
}
}
}
}
xmlFree
(
graphics_type
);
xmlFree
(
graphics_type
);
...
@@ -305,6 +310,7 @@ static int virDomainParseXMLGraphicsDescVFB(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -305,6 +310,7 @@ static int virDomainParseXMLGraphicsDescVFB(virConnectPtr conn ATTRIBUTE_UNUSED,
xmlChar
*
vncport
=
xmlGetProp
(
node
,
BAD_CAST
"port"
);
xmlChar
*
vncport
=
xmlGetProp
(
node
,
BAD_CAST
"port"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
node
,
BAD_CAST
"listen"
);
xmlChar
*
vnclisten
=
xmlGetProp
(
node
,
BAD_CAST
"listen"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
node
,
BAD_CAST
"passwd"
);
xmlChar
*
vncpasswd
=
xmlGetProp
(
node
,
BAD_CAST
"passwd"
);
xmlChar
*
keymap
=
xmlGetProp
(
node
,
BAD_CAST
"keymap"
);
if
(
vncport
!=
NULL
)
{
if
(
vncport
!=
NULL
)
{
long
port
=
strtol
((
const
char
*
)
vncport
,
NULL
,
10
);
long
port
=
strtol
((
const
char
*
)
vncport
,
NULL
,
10
);
if
(
port
==
-
1
)
if
(
port
==
-
1
)
...
@@ -321,6 +327,10 @@ static int virDomainParseXMLGraphicsDescVFB(virConnectPtr conn ATTRIBUTE_UNUSED,
...
@@ -321,6 +327,10 @@ static int virDomainParseXMLGraphicsDescVFB(virConnectPtr conn ATTRIBUTE_UNUSED,
virBufferVSprintf
(
buf
,
"(vncpasswd %s)"
,
vncpasswd
);
virBufferVSprintf
(
buf
,
"(vncpasswd %s)"
,
vncpasswd
);
xmlFree
(
vncpasswd
);
xmlFree
(
vncpasswd
);
}
}
if
(
keymap
!=
NULL
)
{
virBufferVSprintf
(
buf
,
"(keymap %s)"
,
keymap
);
xmlFree
(
keymap
);
}
}
}
virBufferAdd
(
buf
,
"))"
,
2
);
virBufferAdd
(
buf
,
"))"
,
2
);
xmlFree
(
graphics_type
);
xmlFree
(
graphics_type
);
...
...
tests/sexpr2xmldata/sexpr2xml-fv-v2.sexpr
浏览文件 @
955f1203
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(acpi 1)(vnc 1)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(acpi 1)(vnc 1)
(keymap ja)
))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml
浏览文件 @
955f1203
...
@@ -32,6 +32,6 @@
...
@@ -32,6 +32,6 @@
<mac
address=
'00:16:3e:1b:b1:47'
/>
<mac
address=
'00:16:3e:1b:b1:47'
/>
<script
path=
'vif-bridge'
/>
<script
path=
'vif-bridge'
/>
</interface>
</interface>
<graphics
type=
'vnc'
port=
'
5903
'
/>
<graphics
type=
'vnc'
port=
'
-1'
keymap=
'ja
'
/>
</devices>
</devices>
</domain>
</domain>
tests/sexpr2xmldata/sexpr2xml-fv.sexpr
浏览文件 @
955f1203
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)
(keymap ja)
))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
tests/sexpr2xmldata/sexpr2xml-fv.xml
浏览文件 @
955f1203
...
@@ -32,6 +32,6 @@
...
@@ -32,6 +32,6 @@
<target
dev=
'hdc'
/>
<target
dev=
'hdc'
/>
<readonly/>
<readonly/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'5903'
/>
<graphics
type=
'vnc'
port=
'5903'
keymap=
'ja'
/>
</devices>
</devices>
</domain>
</domain>
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
浏览文件 @
955f1203
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)))))
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vfb (type vnc)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)
(keymap ja)
))))
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
浏览文件 @
955f1203
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
<source
file=
'/root/some.img'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
<target
dev=
'xvda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'
5906'
listen=
'0.0.0.0
'
/>
<graphics
type=
'vnc'
port=
'
-1'
listen=
'0.0.0.0'
keymap=
'ja
'
/>
</devices>
</devices>
</domain>
</domain>
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
浏览文件 @
955f1203
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')(vnc 1)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')(vnc 1)(vncunused 1)(vnclisten 0.0.0.0)(vncpasswd 123456)
(keymap ja)
))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
浏览文件 @
955f1203
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
<source
file=
'/root/some.img'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
<target
dev=
'xvda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'
5906'
listen=
'0.0.0.0
'
/>
<graphics
type=
'vnc'
port=
'
-1'
listen=
'0.0.0.0'
keymap=
'ja
'
/>
</devices>
</devices>
</domain>
</domain>
tests/xml2sexprdata/xml2sexpr-fv-v2.sexpr
浏览文件 @
955f1203
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(vcpus 1)(boot c)(acpi 1)(vnc 1)(vncdisplay 17)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(vcpus 1)(boot c)(acpi 1)(vnc 1)(vncdisplay 17)(keymap ja)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-fv-vncunused.sexpr
浏览文件 @
955f1203
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(vcpus 1)(boot c)(acpi 1)(vnc 1)(vncunused 1)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(vcpus 1)(boot c)(acpi 1)(vnc 1)(vncunused 1)(keymap ja)))(device (vbd (dev 'hdc:cdrom')(uname 'file:/root/boot.iso')(mode 'r')))(device (vbd (dev 'hda:disk')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-fv-vncunused.xml
浏览文件 @
955f1203
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<source
file=
'/root/foo.img'
/>
<source
file=
'/root/foo.img'
/>
<target
dev=
'ioemu:hda'
/>
<target
dev=
'ioemu:hda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'-1'
/>
<graphics
type=
'vnc'
port=
'-1'
keymap=
'ja'
/>
</devices>
</devices>
</domain>
</domain>
tests/xml2sexprdata/xml2sexpr-fv.xml
浏览文件 @
955f1203
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<source
file=
'/root/foo.img'
/>
<source
file=
'/root/foo.img'
/>
<target
dev=
'ioemu:hda'
/>
<target
dev=
'ioemu:hda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'5917'
/>
<graphics
type=
'vnc'
port=
'5917'
keymap=
'ja'
/>
</devices>
</devices>
</domain>
</domain>
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
浏览文件 @
955f1203
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncdisplay 6)(vnclisten 127.0.0.1)(vncpasswd 123456))))
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncdisplay 6)(vnclisten 127.0.0.1)(vncpasswd 123456)(keymap ja))))
\ No newline at end of file
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.xml
浏览文件 @
955f1203
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
<source
file=
'/root/some.img'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
<target
dev=
'xvda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'5906'
listen=
"127.0.0.1"
passwd=
"123456"
/>
<graphics
type=
'vnc'
port=
'5906'
listen=
"127.0.0.1"
passwd=
"123456"
keymap=
"ja"
/>
</devices>
</devices>
</domain>
</domain>
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.sexpr
浏览文件 @
955f1203
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')(vnc 1)(vncdisplay 6)(vnclisten 127.0.0.1)(vncpasswd 123456)))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')(vnc 1)(vncdisplay 6)(vnclisten 127.0.0.1)(vncpasswd 123456)(keymap ja)))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
\ No newline at end of file
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-pv-vfb-orig.xml
浏览文件 @
955f1203
...
@@ -18,6 +18,6 @@
...
@@ -18,6 +18,6 @@
<source
file=
'/root/some.img'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
<target
dev=
'xvda'
/>
</disk>
</disk>
<graphics
type=
'vnc'
port=
'5906'
listen=
"127.0.0.1"
passwd=
"123456"
/>
<graphics
type=
'vnc'
port=
'5906'
listen=
"127.0.0.1"
passwd=
"123456"
keymap=
"ja"
/>
</devices>
</devices>
</domain>
</domain>
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录