Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
00e8a7a4
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,发现更多精彩内容 >>
提交
00e8a7a4
编写于
11月 14, 2008
作者:
C
Cole Robinson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use different separator for lvs command to unbreak parsing for encrypted devs.
上级
94359e16
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
9 deletion
+17
-9
ChangeLog
ChangeLog
+5
-0
src/storage_backend_logical.c
src/storage_backend_logical.c
+12
-9
未找到文件。
ChangeLog
浏览文件 @
00e8a7a4
Fri Nov 14 09:40:00 EST 2008 Cole Robinson <crobinso@redhat.com>
* src/storage_backend_logical.c: Use different separator for lvs
command to unbreak parsing for encrypted devices.
Fri Nov 14 13:22:36 +0100 2008 Jim Meyering <meyering@redhat.com>
avoid format string warnings
...
...
src/storage_backend_logical.c
浏览文件 @
00e8a7a4
...
...
@@ -173,27 +173,30 @@ virStorageBackendLogicalFindLVs(virConnectPtr conn,
virStorageVolDefPtr
vol
)
{
/*
* # lvs --separator
:
--noheadings --units b --unbuffered --nosuffix --options "lv_name,uuid,devices,seg_size,vg_extent_size" VGNAME
* RootLV
:06UgP5-2rhb-w3Bo-3mdR-WeoL-pytO-SAa2ky:/dev/hda2(0):5234491392:
33554432
* SwapLV
:oHviCK-8Ik0-paqS-V20c-nkhY-Bm1e-zgzU0M:/dev/hda2(156):1040187392:
33554432
* Test2
:3pg3he-mQsA-5Sui-h0i6-HNmc-Cz7W-QSndcR:/dev/hda2(219):1073741824:
33554432
* Test3
:UB5hFw-kmlm-LSoX-EI1t-ioVd-h7GL-M0W8Ht:/dev/hda2(251):2181038080:
33554432
* Test3
:UB5hFw-kmlm-LSoX-EI1t-ioVd-h7GL-M0W8Ht:/dev/hda2(187):1040187392:
33554432
* # lvs --separator
,
--noheadings --units b --unbuffered --nosuffix --options "lv_name,uuid,devices,seg_size,vg_extent_size" VGNAME
* RootLV
,06UgP5-2rhb-w3Bo-3mdR-WeoL-pytO-SAa2ky,/dev/hda2(0),5234491392,
33554432
* SwapLV
,oHviCK-8Ik0-paqS-V20c-nkhY-Bm1e-zgzU0M,/dev/hda2(156),1040187392,
33554432
* Test2
,3pg3he-mQsA-5Sui-h0i6-HNmc-Cz7W-QSndcR,/dev/hda2(219),1073741824,
33554432
* Test3
,UB5hFw-kmlm-LSoX-EI1t-ioVd-h7GL-M0W8Ht,/dev/hda2(251),2181038080,
33554432
* Test3
,UB5hFw-kmlm-LSoX-EI1t-ioVd-h7GL-M0W8Ht,/dev/hda2(187),1040187392,
33554432
*
* Pull out name & uuid, device, device extent start #, segment size, extent size.
*
* NB can be multiple rows per volume if they have many extents
*
* NB lvs from some distros (e.g. SLES10 SP2) outputs trailing ":" on each line
* NB lvs from some distros (e.g. SLES10 SP2) outputs trailing "," on each line
*
* NB Encrypted logical volumes can print ':' in their name, so it is
* not a suitable separator (rhbz 470693).
*/
const
char
*
regexes
[]
=
{
"^
\\
s*(
\\
S+)
:(
\\
S+):(
\\
S+)
\\
((
\\
S+)
\\
):(
\\
S+):([0-9]+):
?
\\
s*$"
"^
\\
s*(
\\
S+)
,(
\\
S+),(
\\
S+)
\\
((
\\
S+)
\\
),(
\\
S+),([0-9]+),
?
\\
s*$"
};
int
vars
[]
=
{
6
};
const
char
*
prog
[]
=
{
LVS
,
"--separator"
,
"
:
"
,
"--noheadings"
,
"--units"
,
"b"
,
LVS
,
"--separator"
,
"
,
"
,
"--noheadings"
,
"--units"
,
"b"
,
"--unbuffered"
,
"--nosuffix"
,
"--options"
,
"lv_name,uuid,devices,seg_size,vg_extent_size"
,
pool
->
def
->
source
.
name
,
NULL
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录