Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
5995e242
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,发现更多精彩内容 >>
提交
5995e242
编写于
7月 03, 2006
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xend_internal.[ch]:
finished the last entry point missing for the proxy code. Daniel
上级
f14093e5
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
54 addition
and
7 deletion
+54
-7
ChangeLog
ChangeLog
+5
-0
proxy/libvirt_proxy.c
proxy/libvirt_proxy.c
+16
-2
src/proxy_internal.c
src/proxy_internal.c
+30
-3
src/proxy_internal.h
src/proxy_internal.h
+1
-0
src/xend_internal.c
src/xend_internal.c
+1
-2
src/xend_internal.h
src/xend_internal.h
+1
-0
未找到文件。
ChangeLog
浏览文件 @
5995e242
Mon Jul 3 11:21:10 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xend_internal.[ch]:
finished the last entry point missing for the proxy code.
Fri Jun 30 16:31:47 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c src/proxy_internal.c: more bug fixes,
...
...
proxy/libvirt_proxy.c
浏览文件 @
5995e242
...
...
@@ -560,8 +560,22 @@ retry2:
break
;
}
case
VIR_PROXY_NODE_INFO
:
TODO
;
req
->
data
.
arg
=
-
1
;
if
(
req
->
len
!=
sizeof
(
virProxyPacket
))
goto
comm_error
;
/*
* Hum, could we expect those informations to be unmutable and
* cache them ? Since it's probably an unfrequent call better
* not make assumption and do the xend RPC each call.
*/
ret
=
xenDaemonNodeGetInfo
(
conn
,
&
request
.
extra
.
ninfo
);
if
(
ret
<
0
)
{
req
->
data
.
arg
=
-
1
;
req
->
len
=
sizeof
(
virProxyPacket
);
}
else
{
req
->
data
.
arg
=
0
;
req
->
len
=
sizeof
(
virProxyPacket
)
+
sizeof
(
virNodeInfo
);
}
break
;
default:
goto
comm_error
;
...
...
src/proxy_internal.c
浏览文件 @
5995e242
...
...
@@ -49,7 +49,7 @@ static virDriver xenProxyDriver = {
xenProxyClose
,
/* close */
NULL
,
/* type */
xenProxyGetVersion
,
/* version */
NULL
,
/* nodeGetInfo */
xenProxyNodeGetInfo
,
/* nodeGetInfo */
xenProxyListDomains
,
/* listDomains */
xenProxyNumOfDomains
,
/* numOfDomains */
NULL
,
/* domainCreateLinux */
...
...
@@ -889,7 +889,34 @@ xenProxyDomainLookupByName(virConnectPtr conn, const char *name)
*/
static
int
xenProxyNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
info
)
{
TODO
return
(
-
1
);
virProxyPacket
req
;
virProxyFullPacket
ans
;
int
ret
;
if
(
!
VIR_IS_CONNECT
(
conn
))
{
virProxyError
(
conn
,
VIR_ERR_INVALID_CONN
,
__FUNCTION__
);
return
(
-
1
);
}
if
(
info
==
NULL
)
{
virProxyError
(
conn
,
VIR_ERR_INVALID_ARG
,
__FUNCTION__
);
return
(
-
1
);
}
memset
(
&
req
,
0
,
sizeof
(
req
));
req
.
command
=
VIR_PROXY_NODE_INFO
;
req
.
data
.
arg
=
0
;
req
.
len
=
sizeof
(
req
);
ret
=
xenProxyCommand
(
conn
,
&
req
,
&
ans
);
if
(
ret
<
0
)
{
xenProxyClose
(
conn
);
return
(
-
1
);
}
if
(
ans
.
data
.
arg
==
-
1
)
{
return
(
-
1
);
}
if
(
ans
.
len
!=
sizeof
(
virProxyPacket
)
+
sizeof
(
virNodeInfo
))
{
return
(
-
1
);
}
memcpy
(
info
,
&
ans
.
extra
.
ninfo
,
sizeof
(
virNodeInfo
));
return
(
0
);
}
src/proxy_internal.h
浏览文件 @
5995e242
...
...
@@ -77,6 +77,7 @@ struct _virProxyFullPacket {
char
str
[
4080
];
/* extra char array */
int
arg
[
1020
];
/* extra int array */
virDomainInfo
dinfo
;
/* domain informations */
virNodeInfo
ninfo
;
/* node informations */
}
extra
;
};
typedef
struct
_virProxyFullPacket
virProxyFullPacket
;
...
...
src/xend_internal.c
浏览文件 @
5995e242
...
...
@@ -37,7 +37,6 @@
#include "xen_internal.h"
/* for DOM0_INTERFACE_VERSION */
static
const
char
*
xenDaemonGetType
(
virConnectPtr
conn
);
static
int
xenDaemonNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
info
);
static
int
xenDaemonListDomains
(
virConnectPtr
conn
,
int
*
ids
,
int
maxids
);
static
int
xenDaemonNumOfDomains
(
virConnectPtr
conn
);
static
virDomainPtr
xenDaemonLookupByID
(
virConnectPtr
conn
,
int
id
);
...
...
@@ -2072,7 +2071,7 @@ error:
*
* Returns 0 in case of success and -1 in case of failure.
*/
static
int
int
xenDaemonNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
info
)
{
int
ret
=
-
1
;
struct
sexpr
*
root
;
...
...
src/xend_internal.h
浏览文件 @
5995e242
...
...
@@ -601,6 +601,7 @@ void xenDaemonRegister(void);
int
xenDaemonOpen
(
virConnectPtr
conn
,
const
char
*
name
,
int
flags
);
int
xenDaemonClose
(
virConnectPtr
conn
);
int
xenDaemonGetVersion
(
virConnectPtr
conn
,
unsigned
long
*
hvVer
);
int
xenDaemonNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
info
);
int
xenDaemonDomainSuspend
(
virDomainPtr
domain
);
int
xenDaemonDomainResume
(
virDomainPtr
domain
);
int
xenDaemonDomainShutdown
(
virDomainPtr
domain
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录