Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
20b19324
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,发现更多精彩内容 >>
提交
20b19324
编写于
1月 14, 2013
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
virsh-pool.c: Switch to C99 initialization of vshCmdOptDef
上级
7b48d692
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
223 addition
and
63 deletion
+223
-63
tools/virsh-pool.c
tools/virsh-pool.c
+223
-63
未找到文件。
tools/virsh-pool.c
浏览文件 @
20b19324
...
...
@@ -85,9 +85,17 @@ static const vshCmdInfo info_pool_autostart[] = {
};
static
const
vshCmdOptDef
opts_pool_autostart
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"disable"
,
VSH_OT_BOOL
,
0
,
N_
(
"disable autostarting"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"disable"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"disable autostarting"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -130,9 +138,12 @@ static const vshCmdInfo info_pool_create[] = {
};
static
const
vshCmdOptDef
opts_pool_create
[]
=
{
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file containing an XML pool description"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file containing an XML pool description"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -167,16 +178,52 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
* XML Building helper for pool-define-as and pool-create-as
*/
static
const
vshCmdOptDef
opts_pool_X_as
[]
=
{
{
"name"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"name of the pool"
)},
{
"print-xml"
,
VSH_OT_BOOL
,
0
,
N_
(
"print XML document, but don't define/create"
)},
{
"type"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"type of the pool"
)},
{
"source-host"
,
VSH_OT_DATA
,
0
,
N_
(
"source-host for underlying storage"
)},
{
"source-path"
,
VSH_OT_DATA
,
0
,
N_
(
"source path for underlying storage"
)},
{
"source-dev"
,
VSH_OT_DATA
,
0
,
N_
(
"source device for underlying storage"
)},
{
"source-name"
,
VSH_OT_DATA
,
0
,
N_
(
"source name for underlying storage"
)},
{
"target"
,
VSH_OT_DATA
,
0
,
N_
(
"target for underlying storage"
)},
{
"source-format"
,
VSH_OT_STRING
,
0
,
N_
(
"format for underlying storage"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"name"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"name of the pool"
)
},
{.
name
=
"print-xml"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"print XML document, but don't define/create"
)
},
{.
name
=
"type"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"type of the pool"
)
},
{.
name
=
"source-host"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
0
,
.
help
=
N_
(
"source-host for underlying storage"
)
},
{.
name
=
"source-path"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
0
,
.
help
=
N_
(
"source path for underlying storage"
)
},
{.
name
=
"source-dev"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
0
,
.
help
=
N_
(
"source device for underlying storage"
)
},
{.
name
=
"source-name"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
0
,
.
help
=
N_
(
"source name for underlying storage"
)
},
{.
name
=
"target"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
0
,
.
help
=
N_
(
"target for underlying storage"
)
},
{.
name
=
"source-format"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"format for underlying storage"
)
},
{.
name
=
NULL
}
};
static
int
buildPoolXML
(
const
vshCmd
*
cmd
,
const
char
**
retname
,
char
**
xml
)
{
...
...
@@ -287,8 +334,12 @@ static const vshCmdInfo info_pool_define[] = {
};
static
const
vshCmdOptDef
opts_pool_define
[]
=
{
{
"file"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"file containing an XML pool description"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"file"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"file containing an XML pool description"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -367,10 +418,22 @@ static const vshCmdInfo info_pool_build[] = {
};
static
const
vshCmdOptDef
opts_pool_build
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"no-overwrite"
,
VSH_OT_BOOL
,
0
,
N_
(
"do not overwrite an existing pool of this type"
)},
{
"overwrite"
,
VSH_OT_BOOL
,
0
,
N_
(
"overwrite any existing data"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"no-overwrite"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"do not overwrite an existing pool of this type"
)
},
{.
name
=
"overwrite"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"overwrite any existing data"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -415,8 +478,12 @@ static const vshCmdInfo info_pool_destroy[] = {
};
static
const
vshCmdOptDef
opts_pool_destroy
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -450,8 +517,12 @@ static const vshCmdInfo info_pool_delete[] = {
};
static
const
vshCmdOptDef
opts_pool_delete
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -485,8 +556,12 @@ static const vshCmdInfo info_pool_refresh[] = {
};
static
const
vshCmdOptDef
opts_pool_refresh
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -520,9 +595,17 @@ static const vshCmdInfo info_pool_dumpxml[] = {
};
static
const
vshCmdOptDef
opts_pool_dumpxml
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
"inactive"
,
VSH_OT_BOOL
,
0
,
N_
(
"show inactive defined XML"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
"inactive"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"show inactive defined XML"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -786,15 +869,47 @@ static const vshCmdInfo info_pool_list[] = {
};
static
const
vshCmdOptDef
opts_pool_list
[]
=
{
{
"inactive"
,
VSH_OT_BOOL
,
0
,
N_
(
"list inactive pools"
)},
{
"all"
,
VSH_OT_BOOL
,
0
,
N_
(
"list inactive & active pools"
)},
{
"transient"
,
VSH_OT_BOOL
,
0
,
N_
(
"list transient pools"
)},
{
"persistent"
,
VSH_OT_BOOL
,
0
,
N_
(
"list persistent pools"
)},
{
"autostart"
,
VSH_OT_BOOL
,
0
,
N_
(
"list pools with autostart enabled"
)},
{
"no-autostart"
,
VSH_OT_BOOL
,
0
,
N_
(
"list pools with autostart disabled"
)},
{
"type"
,
VSH_OT_STRING
,
0
,
N_
(
"only list pool of specified type(s) (if supported)"
)},
{
"details"
,
VSH_OT_BOOL
,
0
,
N_
(
"display extended details for pools"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"inactive"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list inactive pools"
)
},
{.
name
=
"all"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list inactive & active pools"
)
},
{.
name
=
"transient"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list transient pools"
)
},
{.
name
=
"persistent"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list persistent pools"
)
},
{.
name
=
"autostart"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list pools with autostart enabled"
)
},
{.
name
=
"no-autostart"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"list pools with autostart disabled"
)
},
{.
name
=
"type"
,
.
type
=
VSH_OT_STRING
,
.
flags
=
0
,
.
help
=
N_
(
"only list pool of specified type(s) (if supported)"
)
},
{.
name
=
"details"
,
.
type
=
VSH_OT_BOOL
,
.
flags
=
0
,
.
help
=
N_
(
"display extended details for pools"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1206,12 +1321,27 @@ static const vshCmdInfo info_find_storage_pool_sources_as[] = {
};
static
const
vshCmdOptDef
opts_find_storage_pool_sources_as
[]
=
{
{
"type"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"type of storage pool sources to find"
)},
{
"host"
,
VSH_OT_DATA
,
VSH_OFLAG_NONE
,
N_
(
"optional host to query"
)},
{
"port"
,
VSH_OT_DATA
,
VSH_OFLAG_NONE
,
N_
(
"optional port to query"
)},
{
"initiator"
,
VSH_OT_DATA
,
VSH_OFLAG_NONE
,
N_
(
"optional initiator IQN to use for query"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"type"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"type of storage pool sources to find"
)
},
{.
name
=
"host"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_NONE
,
.
help
=
N_
(
"optional host to query"
)
},
{.
name
=
"port"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_NONE
,
.
help
=
N_
(
"optional port to query"
)
},
{.
name
=
"initiator"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_NONE
,
.
help
=
N_
(
"optional initiator IQN to use for query"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1278,11 +1408,17 @@ static const vshCmdInfo info_find_storage_pool_sources[] = {
};
static
const
vshCmdOptDef
opts_find_storage_pool_sources
[]
=
{
{
"type"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"type of storage pool sources to discover"
)},
{
"srcSpec"
,
VSH_OT_DATA
,
VSH_OFLAG_NONE
,
N_
(
"optional file of source xml to query for pools"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"type"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"type of storage pool sources to discover"
)
},
{.
name
=
"srcSpec"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_NONE
,
.
help
=
N_
(
"optional file of source xml to query for pools"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1325,8 +1461,12 @@ static const vshCmdInfo info_pool_info[] = {
};
static
const
vshCmdOptDef
opts_pool_info
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1417,8 +1557,12 @@ static const vshCmdInfo info_pool_name[] = {
};
static
const
vshCmdOptDef
opts_pool_name
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1445,8 +1589,12 @@ static const vshCmdInfo info_pool_start[] = {
};
static
const
vshCmdOptDef
opts_pool_start
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"name or uuid of the inactive pool"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"name or uuid of the inactive pool"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1480,8 +1628,12 @@ static const vshCmdInfo info_pool_undefine[] = {
};
static
const
vshCmdOptDef
opts_pool_undefine
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name or uuid"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1515,8 +1667,12 @@ static const vshCmdInfo info_pool_uuid[] = {
};
static
const
vshCmdOptDef
opts_pool_uuid
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
help
=
N_
(
"pool name"
)
},
{.
name
=
NULL
}
};
static
bool
...
...
@@ -1548,8 +1704,12 @@ static const vshCmdInfo info_pool_edit[] = {
};
static
const
vshCmdOptDef
opts_pool_edit
[]
=
{
{
"pool"
,
VSH_OT_DATA
,
VSH_OFLAG_REQ
,
N_
(
"pool name or uuid"
)},
{
NULL
,
0
,
0
,
NULL
}
{.
name
=
"pool"
,
.
type
=
VSH_OT_DATA
,
.
flags
=
VSH_OFLAG_REQ
,
.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录