Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
c7c286c6
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看板
提交
c7c286c6
编写于
12月 29, 2016
作者:
D
Dawid Zamirski
提交者:
John Ferlan
1月 10, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vbox: remove _vboxAttachDrivesOld
and fold vboxAttachDrivesNew into vboxAttachDrives
上级
c8d7e90f
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
532 deletion
+1
-532
src/vbox/vbox_common.c
src/vbox/vbox_common.c
+1
-44
src/vbox/vbox_tmpl.c
src/vbox/vbox_tmpl.c
+0
-487
src/vbox/vbox_uniformed_api.h
src/vbox/vbox_uniformed_api.h
+0
-1
未找到文件。
src/vbox/vbox_common.c
浏览文件 @
c7c286c6
...
...
@@ -1039,9 +1039,8 @@ vboxSetBootDeviceOrder(virDomainDefPtr def, vboxDriverPtr data,
}
static
void
vboxAttachDrives
New
(
virDomainDefPtr
def
,
vboxDriverPtr
data
,
IMachine
*
machine
)
vboxAttachDrives
(
virDomainDefPtr
def
,
vboxDriverPtr
data
,
IMachine
*
machine
)
{
/* AttachDrives for 3.0 and later */
size_t
i
;
nsresult
rc
=
0
;
PRUint32
maxPortPerInst
[
StorageBus_Floppy
+
1
]
=
{};
...
...
@@ -1049,9 +1048,6 @@ vboxAttachDrivesNew(virDomainDefPtr def, vboxDriverPtr data, IMachine *machine)
PRUnichar
*
storageCtlName
=
NULL
;
bool
error
=
false
;
if
(
gVBoxAPI
.
vboxAttachDrivesUseOld
)
VIR_WARN
(
"This function may not work in current vbox version"
);
/* get the max port/slots/etc for the given storage bus */
error
=
!
vboxGetMaxPortSlotValues
(
data
->
vboxObj
,
maxPortPerInst
,
maxSlotPerPort
);
...
...
@@ -1247,45 +1243,6 @@ vboxAttachDrivesNew(virDomainDefPtr def, vboxDriverPtr data, IMachine *machine)
}
}
static
void
vboxAttachDrives
(
virDomainDefPtr
def
,
vboxDriverPtr
data
,
IMachine
*
machine
)
{
/* Here, About the vboxAttachDrives. In fact,there is
* three different implementations. We name it as
* v1, v2 and v3.
*
* The first version(v1) is only used in vbox 2.2 and 3.0,
* v2 is used by 3.1 and 3.2, and v3 is used for later
* vbox versions. In sight of implementation, the v1 is
* totally different with v2 and v3. The v2 shares the same
* outline with v3, meanwhile the API they used has much
* difference.
*
* It seems we have no thing to do with old versions such as
* v1 and v2 when developing new vbox drivers. What's more,
* most of the vbox APIs used in v1 and v2 is incompatible with
* new vbox versions. It is a burden to put these APIs into
* vboxUniformedAPI, I prefer not to do that.
*
* After balancing the code size and the complied code size,
* I put my solution here. The v1 and v2 is a version specified
* code, which only be generated for first four version. The v3
* will be put in vbox_common.c, it be complied only once, then
* be used by all next vbox drivers.
*
* Check the flag vboxAttachDrivesUseOld can tell you which
* implementation to use. When the flag is set, we need use
* the old version though gVBoxAPI.vboxAttachDrivesOld. It
* will automatically point to v1 or v2 deponds on you version.
* If the flag is clear, just call vboxAttachDrivesNew, which
* is the v3 implementation.
*/
if
(
gVBoxAPI
.
vboxAttachDrivesUseOld
)
gVBoxAPI
.
vboxAttachDrivesOld
(
def
,
data
,
machine
);
else
vboxAttachDrivesNew
(
def
,
data
,
machine
);
}
static
void
vboxAttachSound
(
virDomainDefPtr
def
,
IMachine
*
machine
)
{
...
...
src/vbox/vbox_tmpl.c
浏览文件 @
c7c286c6
此差异已折叠。
点击以展开。
src/vbox/vbox_uniformed_api.h
浏览文件 @
c7c286c6
...
...
@@ -605,7 +605,6 @@ typedef struct {
bool
detachDevicesExplicitly
;
bool
chipsetType
;
bool
accelerate2DVideo
;
bool
vboxAttachDrivesUseOld
;
bool
oldMediumInterface
;
bool
vboxSnapshotRedefine
;
bool
supportScreenshot
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录