Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
48f32d80
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看板
提交
48f32d80
编写于
11月 12, 2008
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert previous storage patch which broke test driver
上级
8a882660
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
49 deletion
+38
-49
ChangeLog
ChangeLog
+5
-0
src/storage_backend.c
src/storage_backend.c
+33
-11
src/storage_backend.h
src/storage_backend.h
+0
-1
src/storage_driver.c
src/storage_driver.c
+0
-37
未找到文件。
ChangeLog
浏览文件 @
48f32d80
Wed Nov 12 16:13:42 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/storage_backend.c, src/storage_backend.h, src/storage_driver.c:
Revert previous patch which breaks "test" driver's storage APIs.
Tue Nov 11 15:51:42 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Tue Nov 11 15:51:42 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/storage_backend.c, src/storage_backend.h, src/storage_driver.c:
* src/storage_backend.c, src/storage_backend.h, src/storage_driver.c:
...
...
src/storage_backend.c
浏览文件 @
48f32d80
...
@@ -47,27 +47,49 @@
...
@@ -47,27 +47,49 @@
#include "storage_backend.h"
#include "storage_backend.h"
#if WITH_STORAGE_LVM
#include "storage_backend_logical.h"
#endif
#if WITH_STORAGE_ISCSI
#include "storage_backend_iscsi.h"
#endif
#if WITH_STORAGE_DISK
#include "storage_backend_disk.h"
#endif
#if WITH_STORAGE_DIR
#include "storage_backend_fs.h"
#endif
VIR_ENUM_IMPL
(
virStorageBackendPartTable
,
VIR_ENUM_IMPL
(
virStorageBackendPartTable
,
VIR_STORAGE_POOL_DISK_LAST
,
VIR_STORAGE_POOL_DISK_LAST
,
"unknown"
,
"dos"
,
"dvh"
,
"gpt"
,
"unknown"
,
"dos"
,
"dvh"
,
"gpt"
,
"mac"
,
"bsd"
,
"pc98"
,
"sun"
,
"lvm2"
);
"mac"
,
"bsd"
,
"pc98"
,
"sun"
,
"lvm2"
);
static
unsigned
nbackends
=
0
;
static
virStorageBackendPtr
backends
[]
=
{
static
virStorageBackendPtr
*
backends
=
NULL
;
#if WITH_STORAGE_DIR
&
virStorageBackendDirectory
,
#endif
int
virStorageBackendRegister
(
virStorageBackendPtr
bk
)
{
#if WITH_STORAGE_FS
if
(
VIR_REALLOC_N
(
backends
,
nbackends
+
1
)
<
0
)
&
virStorageBackendFileSystem
,
return
-
1
;
&
virStorageBackendNetFileSystem
,
#endif
#if WITH_STORAGE_LVM
&
virStorageBackendLogical
,
#endif
#if WITH_STORAGE_ISCSI
&
virStorageBackendISCSI
,
#endif
#if WITH_STORAGE_DISK
&
virStorageBackendDisk
,
#endif
NULL
};
backends
[
nbackends
++
]
=
bk
;
return
0
;
}
virStorageBackendPtr
virStorageBackendPtr
virStorageBackendForType
(
int
type
)
{
virStorageBackendForType
(
int
type
)
{
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
nbackends
;
i
++
)
for
(
i
=
0
;
backends
[
i
]
;
i
++
)
if
(
backends
[
i
]
->
type
==
type
)
if
(
backends
[
i
]
->
type
==
type
)
return
backends
[
i
];
return
backends
[
i
];
...
...
src/storage_backend.h
浏览文件 @
48f32d80
...
@@ -121,7 +121,6 @@ struct _virStorageBackend {
...
@@ -121,7 +121,6 @@ struct _virStorageBackend {
int
volType
;
int
volType
;
};
};
int
virStorageBackendRegister
(
virStorageBackendPtr
bk
);
virStorageBackendPtr
virStorageBackendForType
(
int
type
);
virStorageBackendPtr
virStorageBackendForType
(
int
type
);
virStorageBackendPoolOptionsPtr
virStorageBackendPoolOptionsForType
(
int
type
);
virStorageBackendPoolOptionsPtr
virStorageBackendPoolOptionsForType
(
int
type
);
...
...
src/storage_driver.c
浏览文件 @
48f32d80
...
@@ -41,20 +41,6 @@
...
@@ -41,20 +41,6 @@
#include "memory.h"
#include "memory.h"
#include "storage_backend.h"
#include "storage_backend.h"
#if WITH_STORAGE_LVM
#include "storage_backend_logical.h"
#endif
#if WITH_STORAGE_ISCSI
#include "storage_backend_iscsi.h"
#endif
#if WITH_STORAGE_DISK
#include "storage_backend_disk.h"
#endif
#if WITH_STORAGE_DIR
#include "storage_backend_fs.h"
#endif
#define storageLog(msg...) fprintf(stderr, msg)
#define storageLog(msg...) fprintf(stderr, msg)
static
virStorageDriverStatePtr
driverState
;
static
virStorageDriverStatePtr
driverState
;
...
@@ -111,29 +97,6 @@ storageDriverStartup(void) {
...
@@ -111,29 +97,6 @@ storageDriverStartup(void) {
char
*
base
=
NULL
;
char
*
base
=
NULL
;
char
driverConf
[
PATH_MAX
];
char
driverConf
[
PATH_MAX
];
#if WITH_STORAGE_DIR
if
(
virStorageBackendRegister
(
&
virStorageBackendDirectory
)
<
0
)
return
-
1
;
#endif
#if WITH_STORAGE_FS
if
(
virStorageBackendRegister
(
&
virStorageBackendFileSystem
)
<
0
)
return
-
1
;
if
(
virStorageBackendRegister
(
&
virStorageBackendNetFileSystem
)
<
0
)
return
-
1
;
#endif
#if WITH_STORAGE_LVM
if
(
virStorageBackendRegister
(
&
virStorageBackendLogical
)
<
0
)
return
-
1
;
#endif
#if WITH_STORAGE_ISCSI
if
(
virStorageBackendRegister
(
&
virStorageBackendISCSI
)
<
0
)
return
-
1
;
#endif
#if WITH_STORAGE_DISK
if
(
virStorageBackendRegister
(
&
virStorageBackendDisk
)
<
0
)
return
-
1
;
#endif
if
(
VIR_ALLOC
(
driverState
)
<
0
)
if
(
VIR_ALLOC
(
driverState
)
<
0
)
return
-
1
;
return
-
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录