Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
f4046091
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,发现更多精彩内容 >>
提交
f4046091
编写于
6月 07, 2007
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed handling of bridge devices
上级
80b7a7ab
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
20 addition
and
2 deletion
+20
-2
ChangeLog
ChangeLog
+7
-0
src/xm_internal.c
src/xm_internal.c
+9
-0
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
+1
-1
tests/xmconfigdata/test-fullvirt-new-cdrom.xml
tests/xmconfigdata/test-fullvirt-new-cdrom.xml
+1
-0
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
+1
-1
tests/xmconfigdata/test-fullvirt-old-cdrom.xml
tests/xmconfigdata/test-fullvirt-old-cdrom.xml
+1
-0
未找到文件。
ChangeLog
浏览文件 @
f4046091
Thu Jun 7 14:20:30 EST 2007 Daniel Berrange <berrange@redhat.com>
* src/xm_internal.c: Fixed handling of bridge devices
when converting XM configs to XML
* tests/xmconfigdata/test-fullvirt-*: Added explicit
bridge device to test suite
Thu Jun 7 10:47:30 EST 2007 Daniel Berrange <berrange@redhat.com>
Thu Jun 7 10:47:30 EST 2007 Daniel Berrange <berrange@redhat.com>
* autobuild.sh: Ensure build fails if tests fail
* autobuild.sh: Ensure build fails if tests fail
...
...
src/xm_internal.c
浏览文件 @
f4046091
...
@@ -824,8 +824,10 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -824,8 +824,10 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
char
script
[
PATH_MAX
];
char
script
[
PATH_MAX
];
char
ip
[
16
];
char
ip
[
16
];
char
mac
[
18
];
char
mac
[
18
];
char
bridge
[
50
];
char
*
key
;
char
*
key
;
bridge
[
0
]
=
'\0'
;
mac
[
0
]
=
'\0'
;
mac
[
0
]
=
'\0'
;
script
[
0
]
=
'\0'
;
script
[
0
]
=
'\0'
;
ip
[
0
]
=
'\0'
;
ip
[
0
]
=
'\0'
;
...
@@ -849,7 +851,12 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -849,7 +851,12 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
strncpy
(
mac
,
data
,
len
);
strncpy
(
mac
,
data
,
len
);
mac
[
len
]
=
'\0'
;
mac
[
len
]
=
'\0'
;
}
else
if
(
!
strncmp
(
key
,
"bridge="
,
7
))
{
}
else
if
(
!
strncmp
(
key
,
"bridge="
,
7
))
{
int
len
=
nextkey
?
(
nextkey
-
data
)
:
sizeof
(
bridge
)
-
1
;
type
=
1
;
type
=
1
;
if
(
len
>
(
sizeof
(
bridge
)
-
1
))
len
=
sizeof
(
bridge
)
-
1
;
strncpy
(
bridge
,
data
,
len
);
bridge
[
len
]
=
'\0'
;
}
else
if
(
!
strncmp
(
key
,
"script="
,
7
))
{
}
else
if
(
!
strncmp
(
key
,
"script="
,
7
))
{
int
len
=
nextkey
?
(
nextkey
-
data
)
:
PATH_MAX
-
1
;
int
len
=
nextkey
?
(
nextkey
-
data
)
:
PATH_MAX
-
1
;
if
(
len
>
(
PATH_MAX
-
1
))
if
(
len
>
(
PATH_MAX
-
1
))
...
@@ -879,6 +886,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
...
@@ -879,6 +886,8 @@ char *xenXMDomainFormatXML(virConnectPtr conn, virConfPtr conf) {
virBufferAdd
(
buf
,
" <interface type='bridge'>
\n
"
,
-
1
);
virBufferAdd
(
buf
,
" <interface type='bridge'>
\n
"
,
-
1
);
if
(
mac
[
0
])
if
(
mac
[
0
])
virBufferVSprintf
(
buf
,
" <mac address='%s'/>
\n
"
,
mac
);
virBufferVSprintf
(
buf
,
" <mac address='%s'/>
\n
"
,
mac
);
if
(
type
==
1
&&
bridge
[
0
])
virBufferVSprintf
(
buf
,
" <source bridge='%s'/>
\n
"
,
bridge
);
if
(
script
[
0
])
if
(
script
[
0
])
virBufferVSprintf
(
buf
,
" <script path='%s'/>
\n
"
,
script
);
virBufferVSprintf
(
buf
,
" <script path='%s'/>
\n
"
,
script
);
if
(
ip
[
0
])
if
(
ip
[
0
])
...
...
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
浏览文件 @
f4046091
...
@@ -19,4 +19,4 @@ vncunused = 1
...
@@ -19,4 +19,4 @@ vncunused = 1
vnclisten = "127.0.0.1"
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ]
disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ]
vif = [ "mac=00:16:3E:66:92:9C,type=ioemu" ]
vif = [ "mac=00:16:3E:66:92:9C,
bridge=xenbr1,
type=ioemu" ]
tests/xmconfigdata/test-fullvirt-new-cdrom.xml
浏览文件 @
f4046091
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
</disk>
</disk>
<interface
type=
'bridge'
>
<interface
type=
'bridge'
>
<mac
address=
'00:16:3E:66:92:9C'
/>
<mac
address=
'00:16:3E:66:92:9C'
/>
<source
bridge=
'xenbr1'
/>
</interface>
</interface>
<graphics
type=
'vnc'
port=
'-1'
listen=
'127.0.0.1'
passwd=
'123poi'
/>
<graphics
type=
'vnc'
port=
'-1'
listen=
'127.0.0.1'
passwd=
'123poi'
/>
</devices>
</devices>
...
...
tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
浏览文件 @
f4046091
...
@@ -20,4 +20,4 @@ vncunused = 1
...
@@ -20,4 +20,4 @@ vncunused = 1
vnclisten = "127.0.0.1"
vnclisten = "127.0.0.1"
vncpasswd = "123poi"
vncpasswd = "123poi"
disk = [ "phy:/dev/HostVG/XenGuest2,ioemu:hda,w" ]
disk = [ "phy:/dev/HostVG/XenGuest2,ioemu:hda,w" ]
vif = [ "mac=00:16:3E:66:92:9C,type=ioemu" ]
vif = [ "mac=00:16:3E:66:92:9C,
bridge=xenbr0,
type=ioemu" ]
tests/xmconfigdata/test-fullvirt-old-cdrom.xml
浏览文件 @
f4046091
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
</disk>
</disk>
<interface
type=
'bridge'
>
<interface
type=
'bridge'
>
<mac
address=
'00:16:3E:66:92:9C'
/>
<mac
address=
'00:16:3E:66:92:9C'
/>
<source
bridge=
'xenbr0'
/>
</interface>
</interface>
<graphics
type=
'vnc'
port=
'-1'
listen=
'127.0.0.1'
passwd=
'123poi'
/>
<graphics
type=
'vnc'
port=
'-1'
listen=
'127.0.0.1'
passwd=
'123poi'
/>
</devices>
</devices>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录