Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
6389bea9
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,发现更多精彩内容 >>
提交
6389bea9
编写于
6月 23, 2011
作者:
E
Eric Blake
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "virDomainBlockPull: Implement the main entry points"
This reverts commit
6419f596
.
上级
98723236
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
228 deletion
+0
-228
src/libvirt.c
src/libvirt.c
+0
-228
未找到文件。
src/libvirt.c
浏览文件 @
6389bea9
...
...
@@ -15357,231 +15357,3 @@ error:
virDispatchError
(
conn
);
return
-
1
;
}
/**
* virDomainBlockPull:
* @dom: pointer to domain object
* @path: Fully-qualified filename of disk
* @info: A pointer to a virDomainBlockPullInfo structure, or NULL
* @flags: currently unused, for future extension
*
* Populate a disk image with data from its backing image. Once all data from
* its backing image has been pulled, the disk no longer depends on a backing
* image. This function works incrementally, performing a small amount of work
* each time it is called. When successful, @info is updated with the current
* progress.
*
* Returns -1 in case of failure, 0 when successful.
*/
int
virDomainBlockPull
(
virDomainPtr
dom
,
const
char
*
path
,
virDomainBlockPullInfoPtr
info
,
unsigned
int
flags
)
{
virConnectPtr
conn
;
VIR_DOMAIN_DEBUG
(
dom
,
"path=%p, info=%p, flags=%u"
,
path
,
info
,
flags
);
virResetLastError
();
if
(
!
VIR_IS_CONNECTED_DOMAIN
(
dom
))
{
virLibDomainError
(
VIR_ERR_INVALID_DOMAIN
,
__FUNCTION__
);
virDispatchError
(
NULL
);
return
-
1
;
}
conn
=
dom
->
conn
;
if
(
dom
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
goto
error
;
}
if
(
!
path
)
{
virLibDomainError
(
VIR_ERR_INVALID_ARG
,
_
(
"path is NULL"
));
goto
error
;
}
if
(
conn
->
driver
->
domainBlockPull
)
{
int
ret
;
ret
=
conn
->
driver
->
domainBlockPull
(
dom
,
path
,
info
,
flags
);
if
(
ret
<
0
)
goto
error
;
return
ret
;
}
virLibDomainError
(
VIR_ERR_NO_SUPPORT
,
__FUNCTION__
);
error:
virDispatchError
(
dom
->
conn
);
return
-
1
;
}
/**
* virDomainBlockPullAll:
* @dom: pointer to domain object
* @path: Fully-qualified filename of disk
* @flags: currently unused, for future extension
*
* Populate a disk image with data from its backing image. Once all data from
* its backing image has been pulled, the disk no longer depends on a backing
* image. This function pulls data for the entire device in the background.
* Progress of the operation can be checked with virDomainGetBlockPullInfo() and
* the operation can be aborted with virDomainBlockPullAbort(). When finished,
* an asynchronous event is raised to indicate the final status.
*
* Returns 0 if the operation has started, -1 on failure.
*/
int
virDomainBlockPullAll
(
virDomainPtr
dom
,
const
char
*
path
,
unsigned
int
flags
)
{
virConnectPtr
conn
;
VIR_DOMAIN_DEBUG
(
dom
,
"path=%p, flags=%u"
,
path
,
flags
);
virResetLastError
();
if
(
!
VIR_IS_CONNECTED_DOMAIN
(
dom
))
{
virLibDomainError
(
VIR_ERR_INVALID_DOMAIN
,
__FUNCTION__
);
virDispatchError
(
NULL
);
return
-
1
;
}
conn
=
dom
->
conn
;
if
(
dom
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
goto
error
;
}
if
(
!
path
)
{
virLibDomainError
(
VIR_ERR_INVALID_ARG
,
_
(
"path is NULL"
));
goto
error
;
}
if
(
conn
->
driver
->
domainBlockPullAll
)
{
int
ret
;
ret
=
conn
->
driver
->
domainBlockPullAll
(
dom
,
path
,
flags
);
if
(
ret
<
0
)
goto
error
;
return
ret
;
}
virLibDomainError
(
VIR_ERR_NO_SUPPORT
,
__FUNCTION__
);
error:
virDispatchError
(
dom
->
conn
);
return
-
1
;
}
/**
* virDomainBlockPullAbort:
* @dom: pointer to domain object
* @path: fully-qualified filename of disk
* @flags: currently unused, for future extension
*
* Cancel a pull operation previously started by virDomainBlockPullAll().
*
* Returns -1 in case of failure, 0 when successful.
*/
int
virDomainBlockPullAbort
(
virDomainPtr
dom
,
const
char
*
path
,
unsigned
int
flags
)
{
virConnectPtr
conn
;
VIR_DOMAIN_DEBUG
(
dom
,
"path=%p, flags=%u"
,
path
,
flags
);
virResetLastError
();
if
(
!
VIR_IS_CONNECTED_DOMAIN
(
dom
))
{
virLibDomainError
(
VIR_ERR_INVALID_DOMAIN
,
__FUNCTION__
);
virDispatchError
(
NULL
);
return
-
1
;
}
conn
=
dom
->
conn
;
if
(
dom
->
conn
->
flags
&
VIR_CONNECT_RO
)
{
virLibDomainError
(
VIR_ERR_OPERATION_DENIED
,
__FUNCTION__
);
goto
error
;
}
if
(
!
path
)
{
virLibDomainError
(
VIR_ERR_INVALID_ARG
,
_
(
"path is NULL"
));
goto
error
;
}
if
(
conn
->
driver
->
domainBlockPullAbort
)
{
int
ret
;
ret
=
conn
->
driver
->
domainBlockPullAbort
(
dom
,
path
,
flags
);
if
(
ret
<
0
)
goto
error
;
return
ret
;
}
virLibDomainError
(
VIR_ERR_NO_SUPPORT
,
__FUNCTION__
);
error:
virDispatchError
(
dom
->
conn
);
return
-
1
;
}
/**
* virDomainGetBlockPullInfo:
* @dom: pointer to domain object
* @path: fully-qualified filename of disk
* @info: pointer to a virDomainBlockPullInfo structure
* @flags: currently unused, for future extension
*
* Request progress information on a block pull operation that has been started
* with virDomainBlockPullAll(). If an operation is active for the given
* parameters, @info will be updated with the current progress.
*
* Returns -1 in case of failure, 0 when successful.
*/
int
virDomainGetBlockPullInfo
(
virDomainPtr
dom
,
const
char
*
path
,
virDomainBlockPullInfoPtr
info
,
unsigned
int
flags
)
{
virConnectPtr
conn
;
VIR_DOMAIN_DEBUG
(
dom
,
"path=%p, info=%p, flags=%u"
,
path
,
info
,
flags
);
virResetLastError
();
if
(
!
VIR_IS_CONNECTED_DOMAIN
(
dom
))
{
virLibDomainError
(
VIR_ERR_INVALID_DOMAIN
,
__FUNCTION__
);
virDispatchError
(
NULL
);
return
-
1
;
}
conn
=
dom
->
conn
;
if
(
!
path
)
{
virLibDomainError
(
VIR_ERR_INVALID_ARG
,
_
(
"path is NULL"
));
goto
error
;
}
if
(
!
info
)
{
virLibDomainError
(
VIR_ERR_INVALID_ARG
,
_
(
"info is NULL"
));
goto
error
;
}
if
(
conn
->
driver
->
domainGetBlockPullInfo
)
{
int
ret
;
ret
=
conn
->
driver
->
domainGetBlockPullInfo
(
dom
,
path
,
info
,
flags
);
if
(
ret
<
0
)
goto
error
;
return
ret
;
}
virLibDomainError
(
VIR_ERR_NO_SUPPORT
,
__FUNCTION__
);
error:
virDispatchError
(
dom
->
conn
);
return
-
1
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录