Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
915bc742
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,发现更多精彩内容 >>
提交
915bc742
编写于
1月 15, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove two unused PATH_MAX-sized char arrays from the stack
上级
e065e1ea
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
4 addition
and
20 deletion
+4
-20
src/storage/storage_driver.c
src/storage/storage_driver.c
+2
-14
src/uml/uml_driver.c
src/uml/uml_driver.c
+2
-6
未找到文件。
src/storage/storage_driver.c
浏览文件 @
915bc742
...
@@ -127,9 +127,9 @@ storageDriverAutostart(virStorageDriverStatePtr driver) {
...
@@ -127,9 +127,9 @@ storageDriverAutostart(virStorageDriverStatePtr driver) {
* Initialization function for the QEmu daemon
* Initialization function for the QEmu daemon
*/
*/
static
int
static
int
storageDriverStartup
(
int
privileged
)
{
storageDriverStartup
(
int
privileged
)
{
char
*
base
=
NULL
;
char
*
base
=
NULL
;
char
driverConf
[
PATH_MAX
];
if
(
VIR_ALLOC
(
driverState
)
<
0
)
if
(
VIR_ALLOC
(
driverState
)
<
0
)
return
-
1
;
return
-
1
;
...
@@ -160,11 +160,6 @@ storageDriverStartup(int privileged) {
...
@@ -160,11 +160,6 @@ storageDriverStartup(int privileged) {
/* Configuration paths are either ~/.libvirt/storage/... (session) or
/* Configuration paths are either ~/.libvirt/storage/... (session) or
* /etc/libvirt/storage/... (system).
* /etc/libvirt/storage/... (system).
*/
*/
if
(
snprintf
(
driverConf
,
sizeof
(
driverConf
),
"%s/storage.conf"
,
base
)
==
-
1
)
goto
out_of_memory
;
driverConf
[
sizeof
(
driverConf
)
-
1
]
=
'\0'
;
if
(
virAsprintf
(
&
driverState
->
configDir
,
if
(
virAsprintf
(
&
driverState
->
configDir
,
"%s/storage"
,
base
)
==
-
1
)
"%s/storage"
,
base
)
==
-
1
)
goto
out_of_memory
;
goto
out_of_memory
;
...
@@ -175,13 +170,6 @@ storageDriverStartup(int privileged) {
...
@@ -175,13 +170,6 @@ storageDriverStartup(int privileged) {
VIR_FREE
(
base
);
VIR_FREE
(
base
);
/*
if (virStorageLoadDriverConfig(driver, driverConf) < 0) {
virStorageDriverShutdown();
return -1;
}
*/
if
(
virStoragePoolLoadAllConfigs
(
&
driverState
->
pools
,
if
(
virStoragePoolLoadAllConfigs
(
&
driverState
->
pools
,
driverState
->
configDir
,
driverState
->
configDir
,
driverState
->
autostartDir
)
<
0
)
driverState
->
autostartDir
)
<
0
)
...
...
src/uml/uml_driver.c
浏览文件 @
915bc742
...
@@ -342,10 +342,10 @@ cleanup:
...
@@ -342,10 +342,10 @@ cleanup:
* Initialization function for the Uml daemon
* Initialization function for the Uml daemon
*/
*/
static
int
static
int
umlStartup
(
int
privileged
)
{
umlStartup
(
int
privileged
)
{
uid_t
uid
=
geteuid
();
uid_t
uid
=
geteuid
();
char
*
base
=
NULL
;
char
*
base
=
NULL
;
char
driverConf
[
PATH_MAX
];
char
*
userdir
=
NULL
;
char
*
userdir
=
NULL
;
if
(
VIR_ALLOC
(
uml_driver
)
<
0
)
if
(
VIR_ALLOC
(
uml_driver
)
<
0
)
...
@@ -398,10 +398,6 @@ umlStartup(int privileged) {
...
@@ -398,10 +398,6 @@ umlStartup(int privileged) {
/* Configuration paths are either ~/.libvirt/uml/... (session) or
/* Configuration paths are either ~/.libvirt/uml/... (session) or
* /etc/libvirt/uml/... (system).
* /etc/libvirt/uml/... (system).
*/
*/
if
(
snprintf
(
driverConf
,
sizeof
(
driverConf
),
"%s/uml.conf"
,
base
)
==
-
1
)
goto
out_of_memory
;
driverConf
[
sizeof
(
driverConf
)
-
1
]
=
'\0'
;
if
(
virAsprintf
(
&
uml_driver
->
configDir
,
"%s/uml"
,
base
)
==
-
1
)
if
(
virAsprintf
(
&
uml_driver
->
configDir
,
"%s/uml"
,
base
)
==
-
1
)
goto
out_of_memory
;
goto
out_of_memory
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录