Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
a39875b7
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,发现更多精彩内容 >>
提交
a39875b7
编写于
5月 03, 2013
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adapt to VIR_STRDUP and VIR_STRNDUP in src/phyp/*
上级
b3c649ac
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
10 addition
and
40 deletion
+10
-40
src/phyp/phyp_driver.c
src/phyp/phyp_driver.c
+10
-40
未找到文件。
src/phyp/phyp_driver.c
浏览文件 @
a39875b7
...
@@ -954,12 +954,8 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
...
@@ -954,12 +954,8 @@ openSSHSession(virConnectPtr conn, virConnectAuthPtr auth,
}
}
if
(
conn
->
uri
->
user
!=
NULL
)
{
if
(
conn
->
uri
->
user
!=
NULL
)
{
username
=
strdup
(
conn
->
uri
->
user
);
if
(
VIR_STRDUP
(
username
,
conn
->
uri
->
user
)
<
0
)
if
(
username
==
NULL
)
{
virReportOOMError
();
goto
err
;
goto
err
;
}
}
else
{
}
else
{
if
(
auth
==
NULL
||
auth
->
cb
==
NULL
)
{
if
(
auth
==
NULL
||
auth
->
cb
==
NULL
)
{
virReportError
(
VIR_ERR_AUTH_FAILED
,
virReportError
(
VIR_ERR_AUTH_FAILED
,
...
@@ -1141,15 +1137,9 @@ phypConnectOpen(virConnectPtr conn,
...
@@ -1141,15 +1137,9 @@ phypConnectOpen(virConnectPtr conn,
if
(
conn
->
uri
->
path
)
{
if
(
conn
->
uri
->
path
)
{
/* need to shift one byte in order to remove the first "/" of URI component */
/* need to shift one byte in order to remove the first "/" of URI component */
if
(
conn
->
uri
->
path
[
0
]
==
'/'
)
if
(
VIR_STRDUP
(
managed_system
,
managed_system
=
strdup
(
conn
->
uri
->
path
+
1
);
conn
->
uri
->
path
+
(
conn
->
uri
->
path
[
0
]
==
'/'
))
<
0
)
else
managed_system
=
strdup
(
conn
->
uri
->
path
);
if
(
!
managed_system
)
{
virReportOOMError
();
goto
failure
;
goto
failure
;
}
/* here we are handling only the first component of the path,
/* here we are handling only the first component of the path,
* so skipping the second:
* so skipping the second:
...
@@ -1498,12 +1488,8 @@ phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
...
@@ -1498,12 +1488,8 @@ phypGetBackingDevice(virConnectPtr conn, const char *managed_system,
else
else
goto
cleanup
;
goto
cleanup
;
backing_device
=
strdup
(
char_ptr
);
if
(
VIR_STRDUP
(
backing_device
,
char_ptr
)
<
0
)
if
(
backing_device
==
NULL
)
{
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
}
else
{
}
else
{
backing_device
=
ret
;
backing_device
=
ret
;
ret
=
NULL
;
ret
=
NULL
;
...
@@ -1731,12 +1717,8 @@ phypDomainAttachDevice(virDomainPtr domain, const char *xml)
...
@@ -1731,12 +1717,8 @@ phypDomainAttachDevice(virDomainPtr domain, const char *xml)
goto
cleanup
;
goto
cleanup
;
}
}
def
->
os
.
type
=
strdup
(
"aix"
);
if
(
VIR_STRDUP
(
def
->
os
.
type
,
"aix"
)
<
0
)
if
(
def
->
os
.
type
==
NULL
)
{
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
dev
=
virDomainDeviceDefParse
(
xml
,
def
,
phyp_driver
->
caps
,
NULL
,
dev
=
virDomainDeviceDefParse
(
xml
,
def
,
phyp_driver
->
caps
,
NULL
,
VIR_DOMAIN_XML_INACTIVE
);
VIR_DOMAIN_XML_INACTIVE
);
...
@@ -2281,12 +2263,8 @@ phypStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
...
@@ -2281,12 +2263,8 @@ phypStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
goto
cleanup
;
goto
cleanup
;
}
}
voldef
.
key
=
strdup
(
vol
->
key
);
if
(
VIR_STRDUP
(
voldef
.
key
,
vol
->
key
)
<
0
)
if
(
voldef
.
key
==
NULL
)
{
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
voldef
.
type
=
VIR_STORAGE_POOL_LOGICAL
;
voldef
.
type
=
VIR_STORAGE_POOL_LOGICAL
;
...
@@ -2399,10 +2377,8 @@ phypStoragePoolListVolumes(virStoragePoolPtr pool, char **const volumes,
...
@@ -2399,10 +2377,8 @@ phypStoragePoolListVolumes(virStoragePoolPtr pool, char **const volumes,
if
(
char_ptr
)
{
if
(
char_ptr
)
{
*
char_ptr
=
'\0'
;
*
char_ptr
=
'\0'
;
if
((
volumes
[
got
++
]
=
strdup
(
volumes_list
))
==
NULL
)
{
if
(
VIR_STRDUP
(
volumes
[
got
++
],
volumes_list
)
<
0
)
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
char_ptr
++
;
char_ptr
++
;
volumes_list
=
char_ptr
;
volumes_list
=
char_ptr
;
}
else
}
else
...
@@ -2600,10 +2576,8 @@ phypConnectListStoragePools(virConnectPtr conn, char **const pools, int npools)
...
@@ -2600,10 +2576,8 @@ phypConnectListStoragePools(virConnectPtr conn, char **const pools, int npools)
if
(
char_ptr
)
{
if
(
char_ptr
)
{
*
char_ptr
=
'\0'
;
*
char_ptr
=
'\0'
;
if
((
pools
[
got
++
]
=
strdup
(
storage_pools
))
==
NULL
)
{
if
(
VIR_STRDUP
(
pools
[
got
++
],
storage_pools
)
<
0
)
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
char_ptr
++
;
char_ptr
++
;
storage_pools
=
char_ptr
;
storage_pools
=
char_ptr
;
}
else
}
else
...
@@ -3067,10 +3041,8 @@ phypConnectListInterfaces(virConnectPtr conn, char **const names, int nnames)
...
@@ -3067,10 +3041,8 @@ phypConnectListInterfaces(virConnectPtr conn, char **const names, int nnames)
if
(
char_ptr
)
{
if
(
char_ptr
)
{
*
char_ptr
=
'\0'
;
*
char_ptr
=
'\0'
;
if
((
names
[
got
++
]
=
strdup
(
networks
))
==
NULL
)
{
if
(
VIR_STRDUP
(
names
[
got
++
],
networks
)
<
0
)
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
char_ptr
++
;
char_ptr
++
;
networks
=
char_ptr
;
networks
=
char_ptr
;
}
else
{
}
else
{
...
@@ -3234,10 +3206,8 @@ phypConnectListDefinedDomains(virConnectPtr conn, char **const names, int nnames
...
@@ -3234,10 +3206,8 @@ phypConnectListDefinedDomains(virConnectPtr conn, char **const names, int nnames
if
(
char_ptr
)
{
if
(
char_ptr
)
{
*
char_ptr
=
'\0'
;
*
char_ptr
=
'\0'
;
if
((
names
[
got
++
]
=
strdup
(
domains
))
==
NULL
)
{
if
(
VIR_STRDUP
(
names
[
got
++
],
domains
)
<
0
)
virReportOOMError
();
goto
cleanup
;
goto
cleanup
;
}
char_ptr
++
;
char_ptr
++
;
domains
=
char_ptr
;
domains
=
char_ptr
;
}
else
}
else
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录