Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
275f0224
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,发现更多精彩内容 >>
提交
275f0224
编写于
6月 27, 2014
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More indentation fixes
Reindent nwfilter gentech driver and one block in rbd storage backend.
上级
e87ab4c6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
36 addition
and
36 deletion
+36
-36
src/nwfilter/nwfilter_gentech_driver.c
src/nwfilter/nwfilter_gentech_driver.c
+33
-33
src/storage/storage_backend_rbd.c
src/storage/storage_backend_rbd.c
+3
-3
未找到文件。
src/nwfilter/nwfilter_gentech_driver.c
浏览文件 @
275f0224
...
...
@@ -105,12 +105,12 @@ virNWFilterTechDriverForName(const char *name)
{
size_t
i
=
0
;
while
(
filter_tech_drivers
[
i
])
{
if
(
STREQ
(
filter_tech_drivers
[
i
]
->
name
,
name
))
{
if
((
filter_tech_drivers
[
i
]
->
flags
&
TECHDRV_FLAG_INITIALIZED
)
==
0
)
break
;
return
filter_tech_drivers
[
i
];
}
i
++
;
if
(
STREQ
(
filter_tech_drivers
[
i
]
->
name
,
name
))
{
if
((
filter_tech_drivers
[
i
]
->
flags
&
TECHDRV_FLAG_INITIALIZED
)
==
0
)
break
;
return
filter_tech_drivers
[
i
];
}
i
++
;
}
return
NULL
;
}
...
...
@@ -212,10 +212,10 @@ virNWFilterCreateVarHashmap(char *macaddr,
*/
struct
printString
{
virBuffer
buf
;
const
char
*
separator
;
bool
reportMAC
;
bool
reportIP
;
virBuffer
buf
;
const
char
*
separator
;
bool
reportMAC
;
bool
reportIP
;
};
...
...
@@ -250,21 +250,21 @@ virNWFilterPrintVars(virHashTablePtr vars,
bool
reportMAC
,
bool
reportIP
)
{
struct
printString
ps
=
{
.
buf
=
VIR_BUFFER_INITIALIZER
,
.
separator
=
separator
,
.
reportMAC
=
reportMAC
,
.
reportIP
=
reportIP
,
};
virHashForEach
(
vars
,
printString
,
&
ps
);
if
(
virBufferError
(
&
ps
.
buf
))
{
virBufferFreeAndReset
(
&
ps
.
buf
);
virReportOOMError
();
return
NULL
;
}
return
virBufferContentAndReset
(
&
ps
.
buf
);
struct
printString
ps
=
{
.
buf
=
VIR_BUFFER_INITIALIZER
,
.
separator
=
separator
,
.
reportMAC
=
reportMAC
,
.
reportIP
=
reportIP
,
};
virHashForEach
(
vars
,
printString
,
&
ps
);
if
(
virBufferError
(
&
ps
.
buf
))
{
virBufferFreeAndReset
(
&
ps
.
buf
);
virReportOOMError
();
return
NULL
;
}
return
virBufferContentAndReset
(
&
ps
.
buf
);
}
...
...
@@ -573,9 +573,9 @@ virNWFilterDetermineMissingVarsRec(virNWFilterDefPtr filter,
if
(
obj
->
newDef
)
{
next_filter
=
obj
->
newDef
;
}
break
;
break
;
case
INSTANTIATE_ALWAYS
:
break
;
break
;
}
rc
=
virNWFilterDetermineMissingVarsRec
(
next_filter
,
...
...
@@ -703,7 +703,7 @@ virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
goto
err_exit
;
}
}
else
goto
err_unresolvable_vars
;
goto
err_unresolvable_vars
;
}
else
if
(
virHashSize
(
missing_vars
->
hashTable
)
>
1
)
{
goto
err_unresolvable_vars
;
}
else
if
(
!
forceWithPendingReq
&&
...
...
@@ -723,10 +723,10 @@ virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
switch
(
useNewFilter
)
{
case
INSTANTIATE_FOLLOW_NEWFILTER
:
instantiate
=
*
foundNewFilter
;
break
;
break
;
case
INSTANTIATE_ALWAYS
:
instantiate
=
true
;
break
;
break
;
}
if
(
instantiate
)
{
...
...
@@ -857,10 +857,10 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
filter
=
obj
->
newDef
;
*
foundNewFilter
=
true
;
}
break
;
break
;
case
INSTANTIATE_ALWAYS
:
break
;
break
;
}
rc
=
virNWFilterInstantiate
(
vmuuid
,
...
...
@@ -1087,7 +1087,7 @@ _virNWFilterTeardownFilter(const char *ifname)
virNWFilterTerminateLearnReq
(
ifname
);
if
(
virNWFilterLockIface
(
ifname
)
<
0
)
return
-
1
;
return
-
1
;
techdriver
->
allTeardown
(
ifname
);
...
...
src/storage/storage_backend_rbd.c
浏览文件 @
275f0224
...
...
@@ -196,9 +196,9 @@ static int virStorageBackendRBDOpenRADOSConn(virStorageBackendRBDStatePtr ptr,
mon_buff
=
virBufferContentAndReset
(
&
mon_host
);
VIR_DEBUG
(
"RADOS mon_host has been set to: %s"
,
mon_buff
);
if
(
rados_conf_set
(
ptr
->
cluster
,
"mon_host"
,
mon_buff
)
<
0
)
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"failed to set RADOS option: %s"
),
"mon_host"
);
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"failed to set RADOS option: %s"
),
"mon_host"
);
goto
cleanup
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录