Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
67f34cd6
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看板
提交
67f34cd6
编写于
4月 03, 2010
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
xen: Remove virConnectPtr from virXenStoreError
上级
68d5d96b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
24 deletion
+19
-24
src/xen/xs_internal.c
src/xen/xs_internal.c
+19
-24
未找到文件。
src/xen/xs_internal.c
浏览文件 @
67f34cd6
...
@@ -88,7 +88,7 @@ struct xenUnifiedDriver xenStoreDriver = {
...
@@ -88,7 +88,7 @@ struct xenUnifiedDriver xenStoreDriver = {
#endif
/* ! PROXY */
#endif
/* ! PROXY */
#define virXenStoreError(co
nn, co
de, ...) \
#define virXenStoreError(code, ...) \
virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
virReportErrorHelper(NULL, VIR_FROM_XENSTORE, code, __FILE__, \
__FUNCTION__, __LINE__, __VA_ARGS__)
__FUNCTION__, __LINE__, __VA_ARGS__)
...
@@ -297,8 +297,8 @@ xenStoreOpen(virConnectPtr conn,
...
@@ -297,8 +297,8 @@ xenStoreOpen(virConnectPtr conn,
* remote) mechanism.
* remote) mechanism.
*/
*/
if
(
xenHavePrivilege
())
{
if
(
xenHavePrivilege
())
{
virXenStoreError
(
NULL
,
VIR_ERR_NO_XEN
,
virXenStoreError
(
VIR_ERR_NO_XEN
,
"%s"
,
_
(
"failed to connect to Xen Store"
));
"%s"
,
_
(
"failed to connect to Xen Store"
));
}
}
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -322,8 +322,8 @@ xenStoreOpen(virConnectPtr conn,
...
@@ -322,8 +322,8 @@ xenStoreOpen(virConnectPtr conn,
if
(
xenStoreAddWatch
(
conn
,
"@releaseDomain"
,
if
(
xenStoreAddWatch
(
conn
,
"@releaseDomain"
,
"releaseDomain"
,
xenStoreDomainReleased
,
priv
)
<
0
)
"releaseDomain"
,
xenStoreDomainReleased
,
priv
)
<
0
)
{
{
virXenStoreError
(
NULL
,
VIR_ERR_INTERNAL_ERROR
,
virXenStoreError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"adding watch @releaseDomain"
));
"%s"
,
_
(
"adding watch @releaseDomain"
));
return
-
1
;
return
-
1
;
}
}
...
@@ -331,8 +331,8 @@ xenStoreOpen(virConnectPtr conn,
...
@@ -331,8 +331,8 @@ xenStoreOpen(virConnectPtr conn,
if
(
xenStoreAddWatch
(
conn
,
"@introduceDomain"
,
if
(
xenStoreAddWatch
(
conn
,
"@introduceDomain"
,
"introduceDomain"
,
xenStoreDomainIntroduced
,
priv
)
<
0
)
"introduceDomain"
,
xenStoreDomainIntroduced
,
priv
)
<
0
)
{
{
virXenStoreError
(
NULL
,
VIR_ERR_INTERNAL_ERROR
,
virXenStoreError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"adding watch @introduceDomain"
));
"%s"
,
_
(
"adding watch @introduceDomain"
));
return
-
1
;
return
-
1
;
}
}
...
@@ -362,7 +362,7 @@ xenStoreClose(virConnectPtr conn)
...
@@ -362,7 +362,7 @@ xenStoreClose(virConnectPtr conn)
xenUnifiedPrivatePtr
priv
;
xenUnifiedPrivatePtr
priv
;
if
(
conn
==
NULL
)
{
if
(
conn
==
NULL
)
{
virXenStoreError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -419,8 +419,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
...
@@ -419,8 +419,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
return
(
-
1
);
return
(
-
1
);
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
)
||
(
info
==
NULL
))
{
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
)
||
(
info
==
NULL
))
{
virXenStoreError
(
domain
?
domain
->
conn
:
NULL
,
VIR_ERR_INVALID_ARG
,
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -485,8 +484,7 @@ xenStoreDomainSetMemory(virDomainPtr domain, unsigned long memory)
...
@@ -485,8 +484,7 @@ xenStoreDomainSetMemory(virDomainPtr domain, unsigned long memory)
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
)
||
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
)
||
(
memory
<
1024
*
MIN_XEN_GUEST_SIZE
))
{
(
memory
<
1024
*
MIN_XEN_GUEST_SIZE
))
{
virXenStoreError
(
domain
?
domain
->
conn
:
NULL
,
VIR_ERR_INVALID_ARG
,
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
if
(
domain
->
id
==
-
1
)
if
(
domain
->
id
==
-
1
)
...
@@ -550,13 +548,13 @@ xenStoreNumOfDomains(virConnectPtr conn)
...
@@ -550,13 +548,13 @@ xenStoreNumOfDomains(virConnectPtr conn)
xenUnifiedPrivatePtr
priv
;
xenUnifiedPrivatePtr
priv
;
if
(
conn
==
NULL
)
{
if
(
conn
==
NULL
)
{
virXenStoreError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
-
1
;
return
-
1
;
}
}
priv
=
(
xenUnifiedPrivatePtr
)
conn
->
privateData
;
priv
=
(
xenUnifiedPrivatePtr
)
conn
->
privateData
;
if
(
priv
->
xshandle
==
NULL
)
{
if
(
priv
->
xshandle
==
NULL
)
{
virXenStoreError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -638,7 +636,7 @@ xenStoreListDomains(virConnectPtr conn, int *ids, int maxids)
...
@@ -638,7 +636,7 @@ xenStoreListDomains(virConnectPtr conn, int *ids, int maxids)
int
ret
;
int
ret
;
if
((
conn
==
NULL
)
||
(
ids
==
NULL
))
{
if
((
conn
==
NULL
)
||
(
ids
==
NULL
))
{
virXenStoreError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
...
@@ -673,7 +671,7 @@ xenStoreLookupByName(virConnectPtr conn, const char *name)
...
@@ -673,7 +671,7 @@ xenStoreLookupByName(virConnectPtr conn, const char *name)
xenUnifiedPrivatePtr
priv
;
xenUnifiedPrivatePtr
priv
;
if
((
conn
==
NULL
)
||
(
name
==
NULL
))
{
if
((
conn
==
NULL
)
||
(
name
==
NULL
))
{
virXenStoreError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -737,8 +735,7 @@ xenStoreDomainShutdown(virDomainPtr domain)
...
@@ -737,8 +735,7 @@ xenStoreDomainShutdown(virDomainPtr domain)
xenUnifiedPrivatePtr
priv
;
xenUnifiedPrivatePtr
priv
;
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
virXenStoreError
((
domain
?
domain
->
conn
:
NULL
),
VIR_ERR_INVALID_ARG
,
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
if
(
domain
->
id
==
-
1
||
domain
->
id
==
0
)
if
(
domain
->
id
==
-
1
||
domain
->
id
==
0
)
...
@@ -772,8 +769,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
...
@@ -772,8 +769,7 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
xenUnifiedPrivatePtr
priv
;
xenUnifiedPrivatePtr
priv
;
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
virXenStoreError
((
domain
?
domain
->
conn
:
NULL
),
VIR_ERR_INVALID_ARG
,
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
__FUNCTION__
);
return
(
-
1
);
return
(
-
1
);
}
}
if
(
domain
->
id
==
-
1
||
domain
->
id
==
0
)
if
(
domain
->
id
==
-
1
||
domain
->
id
==
0
)
...
@@ -803,8 +799,7 @@ xenStoreDomainGetOSType(virDomainPtr domain) {
...
@@ -803,8 +799,7 @@ xenStoreDomainGetOSType(virDomainPtr domain) {
char
*
vm
,
*
str
=
NULL
;
char
*
vm
,
*
str
=
NULL
;
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
if
((
domain
==
NULL
)
||
(
domain
->
conn
==
NULL
))
{
virXenStoreError
((
domain
?
domain
->
conn
:
NULL
),
VIR_ERR_INVALID_ARG
,
virXenStoreError
(
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
__FUNCTION__
);
return
(
NULL
);
return
(
NULL
);
}
}
...
@@ -1200,8 +1195,8 @@ int xenStoreAddWatch(virConnectPtr conn,
...
@@ -1200,8 +1195,8 @@ int xenStoreAddWatch(virConnectPtr conn,
for
(
n
=
0
;
n
<
list
->
count
;
n
++
)
{
for
(
n
=
0
;
n
<
list
->
count
;
n
++
)
{
if
(
STREQ
(
list
->
watches
[
n
]
->
path
,
path
)
&&
if
(
STREQ
(
list
->
watches
[
n
]
->
path
,
path
)
&&
STREQ
(
list
->
watches
[
n
]
->
token
,
token
))
{
STREQ
(
list
->
watches
[
n
]
->
token
,
token
))
{
virXenStoreError
(
NULL
,
VIR_ERR_INTERNAL_ERROR
,
virXenStoreError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"watch already tracked"
));
"%s"
,
_
(
"watch already tracked"
));
return
-
1
;
return
-
1
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录