Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
4909bcbb
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,发现更多精彩内容 >>
提交
4909bcbb
编写于
1月 14, 2013
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh-volume.c: Switch to C99 initialization of vshCmdOptDef
上级
85716089
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
286 addition
and
82 deletion
+286
-82
tools/virsh-volume.c
tools/virsh-volume.c
+286
-82
未找到文件。
tools/virsh-volume.c
浏览文件 @
4909bcbb
...
...
@@ -112,21 +112,47 @@ static const vshCmdInfo info_vol_create_as[] = {
};
static
const
vshCmdOptDef
opts_vol_create_as
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name"
)},
{
"name"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"name of the volume"
)},
{
"capacity"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"size of the vol, as scaled integer (default bytes)"
)},
{
"allocation"
,
VSH_OT_STRING
,
0
,
N_
(
"initial allocation size, as scaled integer (default bytes)"
)},
{
"format"
,
VSH_OT_STRING
,
0
,
N_
(
"file format type raw,bochs,qcow,qcow2,qed,vmdk"
)},
{
"backing-vol"
,
VSH_OT_STRING
,
0
,
N_
(
"the backing volume if taking a snapshot"
)},
{
"backing-vol-format"
,
VSH_OT_STRING
,
0
,
N_
(
"format of backing volume if taking a snapshot"
)},
{
"prealloc-metadata"
,
VSH_OT_BOOL
,
0
,
N_
(
"preallocate metadata (for qcow2 "
"instead of full allocation)"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name"
)
},
{.
name
=
"name"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"name of the volume"
)
},
{.
name
=
"capacity"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"size of the vol, as scaled integer (default bytes)"
)
},
{.
name
=
"allocation"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"initial allocation size, as scaled integer (default bytes)"
)
},
{.
name
=
"format"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"file format type raw,bochs,qcow,qcow2,qed,vmdk"
)
},
{.
name
=
"backing-vol"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"the backing volume if taking a snapshot"
)
},
{.
name
=
"backing-vol-format"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"format of backing volume if taking a snapshot"
)
},
{.
name
=
"prealloc-metadata"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"preallocate metadata (for qcow2 instead of full allocation)"
)
},
{.
name
=
NULL
}
};
static
int
...
...
@@ -290,11 +316,22 @@ static const vshCmdInfo info_vol_create[] = {
};
static
const
vshCmdOptDef
opts_vol_create
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name"
)},
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file containing an XML vol description"
)},
{
"prealloc-metadata"
,
VSH_OT_BOOL
,
0
,
N_
(
"preallocate metadata (for qcow2 "
"instead of full allocation)"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name"
)
},
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file containing an XML vol description"
)
},
{.
name
=
"prealloc-metadata"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"preallocate metadata (for qcow2 instead of full allocation)"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -349,13 +386,32 @@ static const vshCmdInfo info_vol_create_from[] = {
};
static
const
vshCmdOptDef
opts_vol_create_from
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file containing an XML vol description"
)},
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"input vol name or key"
)},
{
"inputpool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid of the input volume's pool"
)},
{
"prealloc-metadata"
,
VSH_OT_BOOL
,
0
,
N_
(
"preallocate metadata (for qcow2 "
"instead of full allocation)"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file containing an XML vol description"
)
},
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"input vol name or key"
)
},
{.
name
=
"inputpool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid of the input volume's pool"
)
},
{.
name
=
"prealloc-metadata"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"preallocate metadata (for qcow2 instead of full allocation)"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -446,12 +502,27 @@ static const vshCmdInfo info_vol_clone[] = {
};
static
const
vshCmdOptDef
opts_vol_clone
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"orig vol name or key"
)},
{
"newname"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"clone name"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
"prealloc-metadata"
,
VSH_OT_BOOL
,
0
,
N_
(
"preallocate metadata (for qcow2 "
"instead of full allocation)"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"orig vol name or key"
)
},
{.
name
=
"newname"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"clone name"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"prealloc-metadata"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"preallocate metadata (for qcow2 instead of full allocation)"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -525,12 +596,32 @@ static const vshCmdInfo info_vol_upload[] = {
};
static
const
vshCmdOptDef
opts_vol_upload
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
"offset"
,
VSH_OT_INT
,
0
,
N_
(
"volume offset to upload to"
)
},
{
"length"
,
VSH_OT_INT
,
0
,
N_
(
"amount of data to upload"
)
},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"offset"
,
.
type
=
VSH_OT_INT
,
.
flags
=
0
,
.
help
=
N_
(
"volume offset to upload to"
)
},
{.
name
=
"length"
,
.
type
=
VSH_OT_INT
,
.
flags
=
0
,
.
help
=
N_
(
"amount of data to upload"
)
},
{.
name
=
NULL
}
};
static
int
...
...
@@ -620,12 +711,32 @@ static const vshCmdInfo info_vol_download[] = {
};
static
const
vshCmdOptDef
opts_vol_download
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
"offset"
,
VSH_OT_INT
,
0
,
N_
(
"volume offset to download from"
)
},
{
"length"
,
VSH_OT_INT
,
0
,
N_
(
"amount of data to download"
)
},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"offset"
,
.
type
=
VSH_OT_INT
,
.
flags
=
0
,
.
help
=
N_
(
"volume offset to download from"
)
},
{.
name
=
"length"
,
.
type
=
VSH_OT_INT
,
.
flags
=
0
,
.
help
=
N_
(
"amount of data to download"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -713,9 +824,17 @@ static const vshCmdInfo info_vol_delete[] = {
};
static
const
vshCmdOptDef
opts_vol_delete
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -750,10 +869,22 @@ static const vshCmdInfo info_vol_wipe[] = {
};
static
const
vshCmdOptDef
opts_vol_wipe
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
"algorithm"
,
VSH_OT_STRING
,
0
,
N_
(
"perform selected wiping algorithm"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"algorithm"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"perform selected wiping algorithm"
)
},
{.
name
=
NULL
}
};
VIR_ENUM_DECL
(
virStorageVolWipeAlgorithm
)
...
...
@@ -814,9 +945,17 @@ static const vshCmdInfo info_vol_info[] = {
};
static
const
vshCmdOptDef
opts_vol_info
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -878,16 +1017,37 @@ static const vshCmdInfo info_vol_resize[] = {
};
static
const
vshCmdOptDef
opts_vol_resize
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"capacity"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"new capacity for the vol, as scaled integer (default bytes)"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
"allocate"
,
VSH_OT_BOOL
,
0
,
N_
(
"allocate the new capacity, rather than leaving it sparse"
)},
{
"delta"
,
VSH_OT_BOOL
,
0
,
N_
(
"use capacity as a delta to current size, rather than the new size"
)},
{
"shrink"
,
VSH_OT_BOOL
,
0
,
N_
(
"allow the resize to shrink the volume"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"capacity"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"new capacity for the vol, as scaled integer (default bytes)"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"allocate"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"allocate the new capacity, rather than leaving it sparse"
)
},
{.
name
=
"delta"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"use capacity as a delta to current size, rather than the new size"
)
},
{.
name
=
"shrink"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"allow the resize to shrink the volume"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -960,9 +1120,17 @@ static const vshCmdInfo info_vol_dumpxml[] = {
};
static
const
vshCmdOptDef
opts_vol_dumpxml
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"vol name, key or path"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"vol name, key or path"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1122,9 +1290,17 @@ static const vshCmdInfo info_vol_list[] = {
};
static
const
vshCmdOptDef
opts_vol_list
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"details"
,
VSH_OT_BOOL
,
0
,
N_
(
"display extended details for volumes"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"details"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"display extended details for volumes"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1391,8 +1567,12 @@ static const vshCmdInfo info_vol_name[] = {
};
static
const
vshCmdOptDef
opts_vol_name
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"volume key or path"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"volume key or path"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1419,9 +1599,17 @@ static const vshCmdInfo info_vol_pool[] = {
};
static
const
vshCmdOptDef
opts_vol_pool
[]
=
{
{
"uuid"
,
VSH_OT_BOOL
,
0
,
N_
(
"return the pool uuid rather than pool name"
)},
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"volume key or path"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"uuid"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"return the pool uuid rather than pool name"
)
},
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"volume key or path"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1471,9 +1659,17 @@ static const vshCmdInfo info_vol_key[] = {
};
static
const
vshCmdOptDef
opts_vol_key
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"volume name or path"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"volume name or path"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1499,9 +1695,17 @@ static const vshCmdInfo info_vol_path[] = {
};
static
const
vshCmdOptDef
opts_vol_path
[]
=
{
{
"vol"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"volume name or key"
)},
{
"pool"
,
VSH_OT_STRING
,
0
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"vol"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"volume name or key"
)
},
{.
name
=
"pool"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录