Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
17817e6a
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,体验更适合开发者的 AI 搜索 >>
提交
17817e6a
编写于
12月 06, 2006
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
New style paravirt framebuffer config in xen 3.0.4
上级
98026c6b
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
95 addition
and
2 deletion
+95
-2
ChangeLog
ChangeLog
+8
-0
src/xend_internal.c
src/xend_internal.c
+15
-1
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
+2
-0
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
+23
-0
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
+2
-0
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
+23
-0
tests/sexpr2xmltest.c
tests/sexpr2xmltest.c
+22
-1
未找到文件。
ChangeLog
浏览文件 @
17817e6a
Mon Dec 6 17:46:03 EST 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Support parsing of new paravirt framebuffer
graphics configuration from xen 3.0.4 tree.
* test/sexpr2xmltest.c: Added test cases for new & old framebuffer
config parsing in paravirt & fullyvirt.
* test/sexpr2xmldata/sexpr2xml-pv-vfb-*: New test data files
Mon Dec 6 17:40:03 EST 2006 Daniel Berrange <berrange@redhat.com>
Mon Dec 6 17:40:03 EST 2006 Daniel Berrange <berrange@redhat.com>
* test/xml2sexprdata/xml2sexpr-curmem.xml, test/xml2sexprdata/xml2sexpr-curmem.sexpr:
* test/xml2sexprdata/xml2sexpr-curmem.xml, test/xml2sexprdata/xml2sexpr-curmem.sexpr:
...
...
src/xend_internal.c
浏览文件 @
17817e6a
...
@@ -1736,6 +1736,19 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1736,6 +1736,19 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
tmp2
);
tmp2
);
virBufferAdd
(
&
buf
,
" </interface>
\n
"
,
17
);
virBufferAdd
(
&
buf
,
" </interface>
\n
"
,
17
);
}
else
if
(
!
hvm
&&
sexpr_lookup
(
node
,
"device/vfb"
))
{
/* New style graphics config for PV guests only in 3.0.4 */
tmp
=
sexpr_node
(
node
,
"device/vfb/type"
);
if
(
tmp
&&
!
strcmp
(
tmp
,
"sdl"
))
{
virBufferAdd
(
&
buf
,
" <graphics type='sdl'/>
\n
"
,
27
);
}
else
if
(
tmp
&&
!
strcmp
(
tmp
,
"vnc"
))
{
int
port
=
xenStoreDomainGetVNCPort
(
conn
,
domid
);
if
(
port
==
-
1
)
port
=
5900
+
domid
;
virBufferVSprintf
(
&
buf
,
" <graphics type='vnc' port='%d'/>
\n
"
,
port
);
}
}
}
}
}
...
@@ -1769,7 +1782,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1769,7 +1782,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
}
}
}
/* Graphics device */
/* Graphics device
(HVM, or old (pre-3.0.4) style PV vnc config)
*/
tmp
=
sexpr_fmt_node
(
root
,
"domain/image/%s/vnc"
,
hvm
?
"hvm"
:
"linux"
);
tmp
=
sexpr_fmt_node
(
root
,
"domain/image/%s/vnc"
,
hvm
?
"hvm"
:
"linux"
);
if
(
tmp
!=
NULL
)
{
if
(
tmp
!=
NULL
)
{
if
(
tmp
[
0
]
==
'1'
)
{
if
(
tmp
[
0
]
==
'1'
)
{
...
@@ -1780,6 +1793,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
...
@@ -1780,6 +1793,7 @@ xend_parse_sexp_desc(virConnectPtr conn, struct sexpr *root, int xendConfigVersi
}
}
}
}
/* Graphics device (HVM, or old (pre-3.0.4) style PV sdl config) */
tmp
=
sexpr_fmt_node
(
root
,
"domain/image/%s/sdl"
,
hvm
?
"hvm"
:
"linux"
);
tmp
=
sexpr_fmt_node
(
root
,
"domain/image/%s/sdl"
,
hvm
?
"hvm"
:
"linux"
);
if
(
tmp
!=
NULL
)
{
if
(
tmp
!=
NULL
)
{
if
(
tmp
[
0
]
==
'1'
)
if
(
tmp
[
0
]
==
'1'
)
...
...
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr
0 → 100644
浏览文件 @
17817e6a
(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)))))
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml
0 → 100644
浏览文件 @
17817e6a
<domain
type=
'xen'
id=
'6'
>
<name>
pvtest
</name>
<uuid>
596a5d2171f48fb2e068e2386a5c413e
</uuid>
<os>
<type>
linux
</type>
<kernel>
/var/lib/xen/vmlinuz.2Dn2YT
</kernel>
<initrd>
/var/lib/xen/initrd.img.0u-Vhq
</initrd>
<cmdline>
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
</cmdline>
</os>
<memory>
430080
</memory>
<vcpu>
2
</vcpu>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
</disk>
<graphics
type=
'vnc'
port=
'5906'
/>
</devices>
</domain>
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr
0 → 100644
浏览文件 @
17817e6a
(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'))))
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml
0 → 100644
浏览文件 @
17817e6a
<domain
type=
'xen'
id=
'6'
>
<name>
pvtest
</name>
<uuid>
596a5d2171f48fb2e068e2386a5c413e
</uuid>
<os>
<type>
linux
</type>
<kernel>
/var/lib/xen/vmlinuz.2Dn2YT
</kernel>
<initrd>
/var/lib/xen/initrd.img.0u-Vhq
</initrd>
<cmdline>
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
</cmdline>
</os>
<memory>
430080
</memory>
<vcpu>
2
</vcpu>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
</disk>
<graphics
type=
'vnc'
port=
'5906'
/>
</devices>
</domain>
tests/sexpr2xmltest.c
浏览文件 @
17817e6a
...
@@ -60,6 +60,20 @@ static int testComparePVversion2(void *data ATTRIBUTE_UNUSED) {
...
@@ -60,6 +60,20 @@ static int testComparePVversion2(void *data ATTRIBUTE_UNUSED) {
2
);
2
);
}
}
static
int
testComparePVOrigVFB
(
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml"
,
"sexpr2xmldata/sexpr2xml-pv-vfb-orig.sexpr"
,
2
);
}
static
int
testComparePVNewVFB
(
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"sexpr2xmldata/sexpr2xml-pv-vfb-new.xml"
,
"sexpr2xmldata/sexpr2xml-pv-vfb-new.sexpr"
,
3
);
}
static
int
testCompareFVversion2
(
void
*
data
ATTRIBUTE_UNUSED
)
{
static
int
testCompareFVversion2
(
void
*
data
ATTRIBUTE_UNUSED
)
{
return
testCompareFiles
(
"sexpr2xmldata/sexpr2xml-fv-v2.xml"
,
return
testCompareFiles
(
"sexpr2xmldata/sexpr2xml-fv-v2.xml"
,
"sexpr2xmldata/sexpr2xml-fv-v2.sexpr"
,
"sexpr2xmldata/sexpr2xml-fv-v2.sexpr"
,
...
@@ -133,8 +147,15 @@ main(int argc, char **argv)
...
@@ -133,8 +147,15 @@ main(int argc, char **argv)
if
(
virtTestRun
(
"SEXPR-2-XML PV config (version 2)"
,
if
(
virtTestRun
(
"SEXPR-2-XML PV config (version 2)"
,
1
,
testComparePVversion2
,
NULL
)
!=
0
)
1
,
testComparePVversion2
,
NULL
)
!=
0
)
ret
=
-
1
;
ret
=
-
1
;
if
(
virtTestRun
(
"SEXPR-2-XML PV config (Orig VFB)"
,
1
,
testComparePVOrigVFB
,
NULL
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"SEXPR-2-XML PV config (New VFB)"
,
1
,
testComparePVNewVFB
,
NULL
)
!=
0
)
ret
=
-
1
;
if
(
virtTestRun
(
"SEXPR-2-XML FV config
(version 2)"
,
if
(
virtTestRun
(
"SEXPR-2-XML FV config (version 2)"
,
1
,
testCompareFVversion2
,
NULL
)
!=
0
)
1
,
testCompareFVversion2
,
NULL
)
!=
0
)
ret
=
-
1
;
ret
=
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录