Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
6bdad268
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看板
提交
6bdad268
编写于
6月 29, 2007
作者:
D
Daniel Veillard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
* src/virsh.c: applied patch from Masayuki Sunou to remove leaks
of domains references in some commands. Daniel
上级
b4c282a7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
25 addition
and
3 deletion
+25
-3
ChangeLog
ChangeLog
+5
-0
src/virsh.c
src/virsh.c
+20
-3
未找到文件。
ChangeLog
浏览文件 @
6bdad268
Fri Jun 29 15:46:34 CEST 2007 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: applied patch from Masayuki Sunou to remove leaks
of domains references in some commands.
Fri Jun 29 15:18:36 CEST 2007 Daniel Veillard <veillard@redhat.com>
* docs/apibuild.py docs/newapi.xsl: fix generation of XML and
...
...
src/virsh.c
浏览文件 @
6bdad268
...
...
@@ -382,6 +382,7 @@ cmdAutostart(vshControl * ctl, vshCmd * cmd)
else
vshPrint
(
ctl
,
_
(
"Domain %s unmarked as autostarted
\n
"
),
name
);
virDomainFree
(
dom
);
return
TRUE
;
}
...
...
@@ -798,6 +799,7 @@ cmdCreate(vshControl * ctl, vshCmd * cmd)
if
(
dom
!=
NULL
)
{
vshPrint
(
ctl
,
_
(
"Domain %s created from %s
\n
"
),
virDomainGetName
(
dom
),
from
);
virDomainFree
(
dom
);
}
else
{
vshError
(
ctl
,
FALSE
,
_
(
"Failed to create domain from %s"
),
from
);
ret
=
FALSE
;
...
...
@@ -845,6 +847,7 @@ cmdDefine(vshControl * ctl, vshCmd * cmd)
if
(
dom
!=
NULL
)
{
vshPrint
(
ctl
,
_
(
"Domain %s defined from %s
\n
"
),
virDomainGetName
(
dom
),
from
);
virDomainFree
(
dom
);
}
else
{
vshError
(
ctl
,
FALSE
,
_
(
"Failed to define domain from %s"
),
from
);
ret
=
FALSE
;
...
...
@@ -887,6 +890,7 @@ cmdUndefine(vshControl * ctl, vshCmd * cmd)
ret
=
FALSE
;
}
virDomainFree
(
dom
);
return
ret
;
}
...
...
@@ -920,6 +924,7 @@ cmdStart(vshControl * ctl, vshCmd * cmd)
if
(
virDomainGetID
(
dom
)
!=
(
unsigned
int
)
-
1
)
{
vshError
(
ctl
,
FALSE
,
_
(
"Domain is already active"
));
virDomainFree
(
dom
);
return
FALSE
;
}
...
...
@@ -931,6 +936,7 @@ cmdStart(vshControl * ctl, vshCmd * cmd)
virDomainGetName
(
dom
));
ret
=
FALSE
;
}
virDomainFree
(
dom
);
return
ret
;
}
...
...
@@ -1026,7 +1032,10 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
if
(
capfound
)
nr_inputparams
++
;
params
=
vshMalloc
(
ctl
,
sizeof
(
virSchedParameter
)
*
nr_inputparams
);
if
(
params
==
NULL
)
return
FALSE
;
if
(
params
==
NULL
)
{
virDomainFree
(
dom
);
return
FALSE
;
}
if
(
weightfound
)
{
strncpy
(
params
[
inputparams
].
field
,
str_weight
,
sizeof
(
str_weight
));
...
...
@@ -1048,7 +1057,10 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
/* Set SchedulerParameters */
if
(
inputparams
>
0
)
{
ret
=
virDomainSetSchedulerParameters
(
dom
,
params
,
inputparams
);
if
(
ret
==
-
1
)
return
FALSE
;
if
(
ret
==
-
1
)
{
virDomainFree
(
dom
);
return
FALSE
;
}
}
free
(
params
);
...
...
@@ -1060,6 +1072,7 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
free
(
schedulertype
);
}
else
{
vshPrint
(
ctl
,
"%-15s: %s
\n
"
,
_
(
"Scheduler"
),
_
(
"Unknown"
));
virDomainFree
(
dom
);
return
FALSE
;
}
...
...
@@ -1070,7 +1083,10 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
memset
(
params
[
i
].
field
,
0
,
sizeof
params
[
i
].
field
);
}
ret
=
virDomainGetSchedulerParameters
(
dom
,
params
,
&
nparams
);
if
(
ret
==
-
1
)
return
FALSE
;
if
(
ret
==
-
1
)
{
virDomainFree
(
dom
);
return
FALSE
;
}
if
(
nparams
){
for
(
i
=
0
;
i
<
nparams
;
i
++
){
switch
(
params
[
i
].
type
)
{
...
...
@@ -1098,6 +1114,7 @@ cmdSchedinfo(vshControl * ctl, vshCmd * cmd)
}
}
free
(
params
);
virDomainFree
(
dom
);
return
TRUE
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录