Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
85f91781
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,发现更多精彩内容 >>
提交
85f91781
编写于
5月 24, 2013
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove redundant two-state integers
上级
e557766c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
17 addition
and
29 deletion
+17
-29
src/conf/network_conf.c
src/conf/network_conf.c
+2
-3
src/conf/storage_conf.c
src/conf/storage_conf.c
+2
-3
src/nwfilter/nwfilter_dhcpsnoop.c
src/nwfilter/nwfilter_dhcpsnoop.c
+1
-7
src/qemu/qemu_process.c
src/qemu/qemu_process.c
+3
-6
src/util/virnetdev.c
src/util/virnetdev.c
+9
-10
未找到文件。
src/conf/network_conf.c
浏览文件 @
85f91781
...
...
@@ -4198,7 +4198,6 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
bool
check_active
)
{
int
ret
=
-
1
;
int
dupVM
=
0
;
virNetworkObjPtr
vm
=
NULL
;
/* See if a VM with matching UUID already exists */
...
...
@@ -4224,7 +4223,7 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
}
}
dupVM
=
1
;
ret
=
1
;
}
else
{
/* UUID does not match, but if a name matches, refuse it */
vm
=
virNetworkFindByName
(
doms
,
def
->
name
);
...
...
@@ -4236,9 +4235,9 @@ virNetworkObjIsDuplicate(virNetworkObjListPtr doms,
def
->
name
,
uuidstr
);
goto
cleanup
;
}
ret
=
0
;
}
ret
=
dupVM
;
cleanup:
if
(
vm
)
virNetworkObjUnlock
(
vm
);
...
...
src/conf/storage_conf.c
浏览文件 @
85f91781
...
...
@@ -1922,7 +1922,6 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
unsigned
int
check_active
)
{
int
ret
=
-
1
;
int
dupPool
=
0
;
virStoragePoolObjPtr
pool
=
NULL
;
/* See if a Pool with matching UUID already exists */
...
...
@@ -1948,7 +1947,7 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
}
}
dupPool
=
1
;
ret
=
1
;
}
else
{
/* UUID does not match, but if a name matches, refuse it */
pool
=
virStoragePoolObjFindByName
(
pools
,
def
->
name
);
...
...
@@ -1960,9 +1959,9 @@ virStoragePoolObjIsDuplicate(virStoragePoolObjListPtr pools,
def
->
name
,
uuidstr
);
goto
cleanup
;
}
ret
=
0
;
}
ret
=
dupPool
;
cleanup:
if
(
pool
)
virStoragePoolObjUnlock
(
pool
);
...
...
src/nwfilter/nwfilter_dhcpsnoop.c
浏览文件 @
85f91781
...
...
@@ -913,7 +913,6 @@ virNWFilterSnoopDHCPGetOpt(virNWFilterSnoopDHCPHdrPtr pd, int len,
uint8_t
*
pmtype
,
uint32_t
*
pleasetime
)
{
int
oind
,
olen
;
int
oend
;
uint32_t
nwint
;
olen
=
len
-
sizeof
(
*
pd
);
...
...
@@ -927,8 +926,6 @@ virNWFilterSnoopDHCPGetOpt(virNWFilterSnoopDHCPHdrPtr pd, int len,
oind
+=
sizeof
(
dhcp_magic
);
oend
=
0
;
*
pmtype
=
0
;
*
pleasetime
=
0
;
...
...
@@ -953,14 +950,11 @@ virNWFilterSnoopDHCPGetOpt(virNWFilterSnoopDHCPHdrPtr pd, int len,
oind
++
;
continue
;
case
DHCPO_END
:
oend
=
1
;
break
;
return
0
;
default:
if
(
olen
-
oind
<
2
)
goto
malformed
;
}
if
(
oend
)
break
;
oind
+=
pd
->
d_opts
[
oind
+
1
]
+
2
;
}
return
0
;
...
...
src/qemu/qemu_process.c
浏览文件 @
85f91781
...
...
@@ -2622,7 +2622,6 @@ static int
qemuProcessFiltersInstantiate
(
virConnectPtr
conn
,
virDomainDefPtr
def
)
{
int
err
=
0
;
int
i
;
if
(
!
conn
)
...
...
@@ -2631,14 +2630,12 @@ qemuProcessFiltersInstantiate(virConnectPtr conn,
for
(
i
=
0
;
i
<
def
->
nnets
;
i
++
)
{
virDomainNetDefPtr
net
=
def
->
nets
[
i
];
if
((
net
->
filter
)
&&
(
net
->
ifname
))
{
if
(
virDomainConfNWFilterInstantiate
(
conn
,
def
->
uuid
,
net
)
<
0
)
{
err
=
1
;
break
;
}
if
(
virDomainConfNWFilterInstantiate
(
conn
,
def
->
uuid
,
net
)
<
0
)
return
1
;
}
}
return
err
;
return
0
;
}
static
int
...
...
src/util/virnetdev.c
浏览文件 @
85f91781
...
...
@@ -1564,7 +1564,6 @@ virNetDevParseVfConfig(struct nlattr **tb, int32_t vf, virMacAddrPtr mac,
struct
ifla_vf_vlan
*
vf_vlan
;
struct
nlattr
*
tb_vf_info
=
{
NULL
,
};
struct
nlattr
*
tb_vf
[
IFLA_VF_MAX
+
1
];
int
found
=
0
;
int
rem
;
if
(
!
tb
[
IFLA_VFINFO_LIST
])
{
...
...
@@ -1588,7 +1587,7 @@ virNetDevParseVfConfig(struct nlattr **tb, int32_t vf, virMacAddrPtr mac,
vf_mac
=
RTA_DATA
(
tb_vf
[
IFLA_VF_MAC
]);
if
(
vf_mac
&&
vf_mac
->
vf
==
vf
)
{
virMacAddrSetRaw
(
mac
,
vf_mac
->
mac
);
found
=
1
;
rc
=
0
;
}
}
...
...
@@ -1596,17 +1595,17 @@ virNetDevParseVfConfig(struct nlattr **tb, int32_t vf, virMacAddrPtr mac,
vf_vlan
=
RTA_DATA
(
tb_vf
[
IFLA_VF_VLAN
]);
if
(
vf_vlan
&&
vf_vlan
->
vf
==
vf
)
{
*
vlanid
=
vf_vlan
->
vlan
;
found
=
1
;
rc
=
0
;
}
}
if
(
found
)
{
rc
=
0
;
goto
cleanup
;
}
if
(
rc
==
0
)
break
;
}
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"couldn't find IFLA_VF_INFO for VF %d "
"in netlink response"
),
vf
);
if
(
rc
<
0
)
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"couldn't find IFLA_VF_INFO for VF %d "
"in netlink response"
),
vf
);
cleanup:
return
rc
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录