Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
1d204cf1
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看板
提交
1d204cf1
编写于
9月 01, 2015
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vmx: Some whitespace cleanup
上级
62c67784
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
12 deletion
+13
-12
src/vmx/vmx.c
src/vmx/vmx.c
+13
-12
未找到文件。
src/vmx/vmx.c
浏览文件 @
1d204cf1
...
...
@@ -2,7 +2,7 @@
* vmx.c: VMware VMX parsing/formatting functions
*
* Copyright (C) 2010-2014 Red Hat, Inc.
* Copyright (C) 2009-201
0
Matthias Bolte <matthias.bolte@googlemail.com>
* Copyright (C) 2009-201
1, 2014-2015
Matthias Bolte <matthias.bolte@googlemail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -2191,8 +2191,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Invalid or not yet handled value '%s' "
"for VMX entry '%s' for device type '%s'"
),
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
goto
cleanup
;
}
}
else
if
(
device
==
VIR_DOMAIN_DISK_DEVICE_CDROM
)
{
...
...
@@ -2248,8 +2248,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Invalid or not yet handled value '%s' "
"for VMX entry '%s' for device type '%s'"
),
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
goto
cleanup
;
}
}
else
if
(
device
==
VIR_DOMAIN_DISK_DEVICE_FLOPPY
)
{
...
...
@@ -2272,8 +2272,8 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Invalid or not yet handled value '%s' "
"for VMX entry '%s' for device type '%s'"
),
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
fileName
,
fileName_name
,
deviceType
?
deviceType
:
"unknown"
);
goto
cleanup
;
}
}
else
{
...
...
@@ -2545,8 +2545,8 @@ virVMXParseEthernet(virConfPtr conf, int controller, virDomainNetDefPtr *def)
STRCASENEQ
(
virtualDev
,
"e1000e"
))
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Expecting VMX entry '%s' to be 'vlance' or 'vmxnet' or "
"'vmxnet3' or 'e1000e' or 'e1000e' but found '%s'"
),
virtualDev_name
,
virtualDev
);
"'vmxnet3' or 'e1000e' or 'e1000e' but found '%s'"
),
virtualDev
_name
,
virtualDev
);
goto
cleanup
;
}
...
...
@@ -3360,7 +3360,7 @@ virVMXFormatVNC(virDomainGraphicsDefPtr def, virBufferPtr buffer)
int
virVMXFormatDisk
(
virVMXContext
*
ctx
,
virDomainDiskDefPtr
def
,
virBufferPtr
buffer
)
virBufferPtr
buffer
)
{
int
controllerOrBus
,
unit
;
const
char
*
vmxDeviceType
=
NULL
;
...
...
@@ -3376,7 +3376,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
* an ISO.
*/
const
char
*
fileExt
=
(
def
->
device
==
VIR_DOMAIN_DISK_DEVICE_DISK
)
?
".vmdk"
:
".iso"
;
".vmdk"
:
".iso"
;
/* Check that we got a valid device type */
if
(
def
->
device
!=
VIR_DOMAIN_DISK_DEVICE_DISK
&&
...
...
@@ -3419,7 +3419,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
if
(
def
->
device
==
VIR_DOMAIN_DISK_DEVICE_DISK
&&
type
==
VIR_STORAGE_TYPE_FILE
)
{
vmxDeviceType
=
(
def
->
bus
==
VIR_DOMAIN_DISK_BUS_SCSI
)
?
"scsi-hardDisk"
:
"ata-hardDisk"
;
"scsi-hardDisk"
:
"ata-hardDisk"
;
}
else
if
(
def
->
device
==
VIR_DOMAIN_DISK_DEVICE_CDROM
)
{
if
(
type
==
VIR_STORAGE_TYPE_FILE
)
vmxDeviceType
=
"cdrom-image"
;
...
...
@@ -3491,6 +3491,7 @@ virVMXFormatDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
virBufferAsprintf
(
buffer
,
"%s%d:%d.mode =
\"
independent-nonpersistent
\"\n
"
,
busType
,
controllerOrBus
,
unit
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录