Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
5641222e
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看板
提交
5641222e
编写于
4月 23, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remote generator, daemon: Handle the CPU functions
They require additional special cases.
上级
900b18f4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
82 addition
and
82 deletion
+82
-82
daemon/remote.c
daemon/remote.c
+0
-64
daemon/remote_dispatch_bodies.c
daemon/remote_dispatch_bodies.c
+59
-3
daemon/remote_dispatch_prototypes.h
daemon/remote_dispatch_prototypes.h
+3
-3
daemon/remote_dispatch_table.h
daemon/remote_dispatch_table.h
+6
-6
daemon/remote_generator.pl
daemon/remote_generator.pl
+14
-6
未找到文件。
daemon/remote.c
浏览文件 @
5641222e
...
...
@@ -3064,70 +3064,6 @@ cleanup:
return
rv
;
}
static
int
remoteDispatchCpuCompare
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_message_header
*
hdr
ATTRIBUTE_UNUSED
,
remote_error
*
rerr
,
remote_cpu_compare_args
*
args
,
remote_cpu_compare_ret
*
ret
)
{
int
result
;
int
rv
=
-
1
;
if
(
!
conn
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"connection not open"
));
goto
cleanup
;
}
if
((
result
=
virConnectCompareCPU
(
conn
,
args
->
xml
,
args
->
flags
))
==
VIR_CPU_COMPARE_ERROR
)
goto
cleanup
;
ret
->
result
=
result
;
rv
=
0
;
cleanup:
if
(
rv
<
0
)
remoteDispatchError
(
rerr
);
return
rv
;
}
static
int
remoteDispatchCpuBaseline
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_message_header
*
hdr
ATTRIBUTE_UNUSED
,
remote_error
*
rerr
,
remote_cpu_baseline_args
*
args
,
remote_cpu_baseline_ret
*
ret
)
{
char
*
cpu
;
int
rv
=
-
1
;
if
(
!
conn
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"connection not open"
));
goto
cleanup
;
}
if
(
!
(
cpu
=
virConnectBaselineCPU
(
conn
,
(
const
char
**
)
args
->
xmlCPUs
.
xmlCPUs_val
,
args
->
xmlCPUs
.
xmlCPUs_len
,
args
->
flags
)))
goto
cleanup
;
ret
->
cpu
=
cpu
;
rv
=
0
;
cleanup:
if
(
rv
<
0
)
remoteDispatchError
(
rerr
);
return
rv
;
}
static
int
remoteDispatchDomainGetJobInfo
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
...
...
daemon/remote_dispatch_bodies.c
浏览文件 @
5641222e
...
...
@@ -15,9 +15,65 @@
/* remoteDispatchClose has to be implemented manually */
/* remoteDispatchCpuBaseline has to be implemented manually */
static
int
remoteDispatchCPUBaseline
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_message_header
*
hdr
ATTRIBUTE_UNUSED
,
remote_error
*
rerr
,
remote_cpu_baseline_args
*
args
,
remote_cpu_baseline_ret
*
ret
)
{
int
rv
=
-
1
;
char
*
cpu
;
if
(
!
conn
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"connection not open"
));
goto
cleanup
;
}
if
((
cpu
=
virConnectBaselineCPU
(
conn
,
(
const
char
**
)
args
->
xmlCPUs
.
xmlCPUs_val
,
args
->
xmlCPUs
.
xmlCPUs_len
,
args
->
flags
))
==
NULL
)
goto
cleanup
;
ret
->
cpu
=
cpu
;
rv
=
0
;
cleanup:
if
(
rv
<
0
)
remoteDispatchError
(
rerr
);
return
rv
;
}
static
int
remoteDispatchCPUCompare
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
remote_message_header
*
hdr
ATTRIBUTE_UNUSED
,
remote_error
*
rerr
,
remote_cpu_compare_args
*
args
,
remote_cpu_compare_ret
*
ret
)
{
int
rv
=
-
1
;
int
result
;
if
(
!
conn
)
{
virNetError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"connection not open"
));
goto
cleanup
;
}
if
((
result
=
virConnectCompareCPU
(
conn
,
args
->
xml
,
args
->
flags
))
==
VIR_CPU_COMPARE_ERROR
)
goto
cleanup
;
ret
->
result
=
result
;
rv
=
0
;
/* remoteDispatchCpuCompare has to be implemented manually */
cleanup:
if
(
rv
<
0
)
remoteDispatchError
(
rerr
);
return
rv
;
}
static
int
remoteDispatchDomainAbortJob
(
...
...
@@ -524,7 +580,7 @@ cleanup:
/* remoteDispatchDomainGetMemoryParameters has to be implemented manually */
static
int
remoteDispatchDomainGetO
s
Type
(
remoteDispatchDomainGetO
S
Type
(
struct
qemud_server
*
server
ATTRIBUTE_UNUSED
,
struct
qemud_client
*
client
ATTRIBUTE_UNUSED
,
virConnectPtr
conn
,
...
...
daemon/remote_dispatch_prototypes.h
浏览文件 @
5641222e
...
...
@@ -50,7 +50,7 @@ static int remoteDispatchClose(
remote_error
*
rerr
,
void
*
args
,
void
*
ret
);
static
int
remoteDispatchC
pu
Baseline
(
static
int
remoteDispatchC
PU
Baseline
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
virConnectPtr
conn
,
...
...
@@ -58,7 +58,7 @@ static int remoteDispatchCpuBaseline(
remote_error
*
rerr
,
remote_cpu_baseline_args
*
args
,
remote_cpu_baseline_ret
*
ret
);
static
int
remoteDispatchC
pu
Compare
(
static
int
remoteDispatchC
PU
Compare
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
virConnectPtr
conn
,
...
...
@@ -274,7 +274,7 @@ static int remoteDispatchDomainGetMemoryParameters(
remote_error
*
rerr
,
remote_domain_get_memory_parameters_args
*
args
,
remote_domain_get_memory_parameters_ret
*
ret
);
static
int
remoteDispatchDomainGetO
s
Type
(
static
int
remoteDispatchDomainGetO
S
Type
(
struct
qemud_server
*
server
,
struct
qemud_client
*
client
,
virConnectPtr
conn
,
...
...
daemon/remote_dispatch_table.h
浏览文件 @
5641222e
...
...
@@ -97,8 +97,8 @@
.
args_filter
=
(
xdrproc_t
)
xdr_remote_domain_get_max_vcpus_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_domain_get_max_vcpus_ret
,
},
{
/* DomainGetO
s
Type => 19 */
.
fn
=
(
dispatch_fn
)
remoteDispatchDomainGetO
s
Type
,
{
/* DomainGetO
S
Type => 19 */
.
fn
=
(
dispatch_fn
)
remoteDispatchDomainGetO
S
Type
,
.
args_filter
=
(
xdrproc_t
)
xdr_remote_domain_get_os_type_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_domain_get_os_type_ret
,
},
...
...
@@ -792,8 +792,8 @@
.
args_filter
=
(
xdrproc_t
)
xdr_void
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_get_lib_version_ret
,
},
{
/* C
pu
Compare => 158 */
.
fn
=
(
dispatch_fn
)
remoteDispatchC
pu
Compare
,
{
/* C
PU
Compare => 158 */
.
fn
=
(
dispatch_fn
)
remoteDispatchC
PU
Compare
,
.
args_filter
=
(
xdrproc_t
)
xdr_remote_cpu_compare_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_cpu_compare_ret
,
},
...
...
@@ -812,8 +812,8 @@
.
args_filter
=
(
xdrproc_t
)
xdr_remote_domain_detach_device_flags_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_void
,
},
{
/* C
pu
Baseline => 162 */
.
fn
=
(
dispatch_fn
)
remoteDispatchC
pu
Baseline
,
{
/* C
PU
Baseline => 162 */
.
fn
=
(
dispatch_fn
)
remoteDispatchC
PU
Baseline
,
.
args_filter
=
(
xdrproc_t
)
xdr_remote_cpu_baseline_args
,
.
ret_filter
=
(
xdrproc_t
)
xdr_remote_cpu_baseline_ret
,
},
...
...
daemon/remote_generator.pl
浏览文件 @
5641222e
...
...
@@ -34,7 +34,8 @@ sub name_to_ProcName {
@elems
=
map
ucfirst
,
@elems
;
@elems
=
map
{
$_
=~
s/Nwfilter/NWFilter/
;
$_
=~
s/Xml/XML/
;
$_
=~
s/Uri/URI/
;
$_
=~
s/Uuid/UUID/
;
$_
=~
s/Id/ID/
;
$_
=~
s/Mac/MAC/
;
$_
}
@elems
;
$_
=~
s/Mac/MAC/
;
$_
=~
s/Cpu/CPU/
;
$_
=~
s/Os/OS/
;
$_
}
@elems
;
join
"",
@elems
}
...
...
@@ -257,8 +258,6 @@ elsif ($opt_b) {
"
AuthSaslStep
",
"
AuthPolkit
",
"
CpuBaseline
",
"
CpuCompare
",
"
DomainBlockPeek
",
"
DomainBlockStats
",
"
DomainCreateWithFlags
",
...
...
@@ -388,6 +387,8 @@ elsif ($opt_b) {
if
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
SecretSetValue
")
{
push
(
@args_list
,
"
(const unsigned char *)args->$1.$1_val
");
}
elsif
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
CPUBaseline
")
{
push
(
@args_list
,
"
(const char **)args->$1.$1_val
");
}
else
{
push
(
@args_list
,
"
args->$1.$1_val
");
}
...
...
@@ -491,7 +492,12 @@ elsif ($opt_b) {
$single_ret_by_ref
=
1
;
}
else
{
$single_ret_by_ref
=
0
;
$single_ret_check
=
"
< 0
";
if
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
CPUCompare
")
{
$single_ret_check
=
"
== VIR_CPU_COMPARE_ERROR
";
}
else
{
$single_ret_check
=
"
< 0
";
}
}
}
elsif
(
$ret_member
=~
m/hyper (\S+)<(\S+)>;/
)
{
push
(
@vars_list
,
"
int len
");
...
...
@@ -597,8 +603,10 @@ elsif ($opt_b) {
$prefix
=
"
Drv
"
}
elsif
(
$calls
{
$_
}
->
{
ProcName
}
=~
m/^(\S+)DumpXML$/
)
{
$proc_name
=
"
${
1
}
GetXMLDesc
"
}
elsif
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
DomainGetOsType
")
{
$proc_name
=
"
DomainGetOSType
"
}
elsif
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
CPUBaseline
")
{
$proc_name
=
"
ConnectBaselineCPU
"
}
elsif
(
$calls
{
$_
}
->
{
ProcName
}
eq
"
CPUCompare
")
{
$proc_name
=
"
ConnectCompareCPU
"
}
if
(
$single_ret_as_list
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录