Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
4a267912
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,发现更多精彩内容 >>
提交
4a267912
编写于
1月 21, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vmx: Use VIR_ERR_CONFIG_UNSUPPORTED when appropriated
上级
a11bd2e6
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
20 addition
and
20 deletion
+20
-20
src/vmx/vmx.c
src/vmx/vmx.c
+20
-20
未找到文件。
src/vmx/vmx.c
浏览文件 @
4a267912
...
@@ -918,7 +918,7 @@ virVMXVerifyDiskAddress(virCapsPtr caps, virDomainDiskDefPtr disk)
...
@@ -918,7 +918,7 @@ virVMXVerifyDiskAddress(virCapsPtr caps, virDomainDiskDefPtr disk)
memset
(
&
def
,
0
,
sizeof
(
def
));
memset
(
&
def
,
0
,
sizeof
(
def
));
if
(
disk
->
info
.
type
!=
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE
)
{
if
(
disk
->
info
.
type
!=
VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE
)
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported disk address type '%s'"
),
_
(
"Unsupported disk address type '%s'"
),
virDomainDeviceAddressTypeToString
(
disk
->
info
.
type
));
virDomainDeviceAddressTypeToString
(
disk
->
info
.
type
));
return
-
1
;
return
-
1
;
...
@@ -1009,7 +1009,7 @@ virVMXVerifyDiskAddress(virCapsPtr caps, virDomainDiskDefPtr disk)
...
@@ -1009,7 +1009,7 @@ virVMXVerifyDiskAddress(virCapsPtr caps, virDomainDiskDefPtr disk)
return
-
1
;
return
-
1
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported bus type '%s'"
),
_
(
"Unsupported bus type '%s'"
),
virDomainDiskBusTypeToString
(
disk
->
bus
));
virDomainDiskBusTypeToString
(
disk
->
bus
));
return
-
1
;
return
-
1
;
...
@@ -1985,7 +1985,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
...
@@ -1985,7 +1985,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
goto
cleanup
;
goto
cleanup
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported bus type '%s' for device type '%s'"
),
_
(
"Unsupported bus type '%s' for device type '%s'"
),
virDomainDiskBusTypeToString
(
busType
),
virDomainDiskBusTypeToString
(
busType
),
virDomainDiskDeviceTypeToString
(
device
));
virDomainDiskDeviceTypeToString
(
device
));
...
@@ -2018,14 +2018,14 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
...
@@ -2018,14 +2018,14 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
goto
cleanup
;
goto
cleanup
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported bus type '%s' for device type '%s'"
),
_
(
"Unsupported bus type '%s' for device type '%s'"
),
virDomainDiskBusTypeToString
(
busType
),
virDomainDiskBusTypeToString
(
busType
),
virDomainDiskDeviceTypeToString
(
device
));
virDomainDiskDeviceTypeToString
(
device
));
goto
cleanup
;
goto
cleanup
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported device type '%s'"
),
_
(
"Unsupported device type '%s'"
),
virDomainDiskDeviceTypeToString
(
device
));
virDomainDiskDeviceTypeToString
(
device
));
goto
cleanup
;
goto
cleanup
;
...
@@ -2201,7 +2201,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
...
@@ -2201,7 +2201,7 @@ virVMXParseDisk(virVMXContext *ctx, virCapsPtr caps, virConfPtr conf,
goto
cleanup
;
goto
cleanup
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
_
(
"Unsupported device type '%s'"
),
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported device type '%s'"
),
virDomainDiskDeviceTypeToString
(
device
));
virDomainDiskDeviceTypeToString
(
device
));
goto
cleanup
;
goto
cleanup
;
}
}
...
@@ -3045,7 +3045,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
...
@@ -3045,7 +3045,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported graphics type '%s'"
),
_
(
"Unsupported graphics type '%s'"
),
virDomainGraphicsTypeToString
(
def
->
graphics
[
i
]
->
type
));
virDomainGraphicsTypeToString
(
def
->
graphics
[
i
]
->
type
));
goto
cleanup
;
goto
cleanup
;
...
@@ -3102,7 +3102,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
...
@@ -3102,7 +3102,7 @@ virVMXFormatConfig(virVMXContext *ctx, virCapsPtr caps, virDomainDefPtr def,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported disk device type '%s'"
),
_
(
"Unsupported disk device type '%s'"
),
virDomainDiskDeviceTypeToString
(
def
->
disks
[
i
]
->
device
));
virDomainDiskDeviceTypeToString
(
def
->
disks
[
i
]
->
device
));
goto
cleanup
;
goto
cleanup
;
...
@@ -3261,14 +3261,14 @@ virVMXFormatHardDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
...
@@ -3261,14 +3261,14 @@ virVMXFormatHardDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
return
-
1
;
return
-
1
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported bus type '%s' for harddisk"
),
_
(
"Unsupported bus type '%s' for harddisk"
),
virDomainDiskBusTypeToString
(
def
->
bus
));
virDomainDiskBusTypeToString
(
def
->
bus
));
return
-
1
;
return
-
1
;
}
}
if
(
def
->
type
!=
VIR_DOMAIN_DISK_TYPE_FILE
)
{
if
(
def
->
type
!=
VIR_DOMAIN_DISK_TYPE_FILE
)
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"%s harddisk '%s' has unsupported type '%s', expecting '%s'"
),
_
(
"%s harddisk '%s' has unsupported type '%s', expecting '%s'"
),
busName
,
def
->
dst
,
virDomainDiskTypeToString
(
def
->
type
),
busName
,
def
->
dst
,
virDomainDiskTypeToString
(
def
->
type
),
virDomainDiskTypeToString
(
VIR_DOMAIN_DISK_TYPE_FILE
));
virDomainDiskTypeToString
(
VIR_DOMAIN_DISK_TYPE_FILE
));
...
@@ -3305,7 +3305,7 @@ virVMXFormatHardDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
...
@@ -3305,7 +3305,7 @@ virVMXFormatHardDisk(virVMXContext *ctx, virDomainDiskDefPtr def,
virBufferVSprintf
(
buffer
,
"%s%d:%d.writeThrough =
\"
true
\"\n
"
,
virBufferVSprintf
(
buffer
,
"%s%d:%d.writeThrough =
\"
true
\"\n
"
,
entryPrefix
,
controllerOrBus
,
unit
);
entryPrefix
,
controllerOrBus
,
unit
);
}
else
if
(
def
->
cachemode
!=
VIR_DOMAIN_DISK_CACHE_DEFAULT
)
{
}
else
if
(
def
->
cachemode
!=
VIR_DOMAIN_DISK_CACHE_DEFAULT
)
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"%s harddisk '%s' has unsupported cache mode '%s'"
),
_
(
"%s harddisk '%s' has unsupported cache mode '%s'"
),
busName
,
def
->
dst
,
busName
,
def
->
dst
,
virDomainDiskCacheTypeToString
(
def
->
cachemode
));
virDomainDiskCacheTypeToString
(
def
->
cachemode
));
...
@@ -3349,7 +3349,7 @@ virVMXFormatCDROM(virVMXContext *ctx, virDomainDiskDefPtr def,
...
@@ -3349,7 +3349,7 @@ virVMXFormatCDROM(virVMXContext *ctx, virDomainDiskDefPtr def,
return
-
1
;
return
-
1
;
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported bus type '%s' for cdrom"
),
_
(
"Unsupported bus type '%s' for cdrom"
),
virDomainDiskBusTypeToString
(
def
->
bus
));
virDomainDiskBusTypeToString
(
def
->
bus
));
return
-
1
;
return
-
1
;
...
@@ -3390,7 +3390,7 @@ virVMXFormatCDROM(virVMXContext *ctx, virDomainDiskDefPtr def,
...
@@ -3390,7 +3390,7 @@ virVMXFormatCDROM(virVMXContext *ctx, virDomainDiskDefPtr def,
entryPrefix
,
controllerOrBus
,
unit
,
def
->
src
);
entryPrefix
,
controllerOrBus
,
unit
,
def
->
src
);
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"%s cdrom '%s' has unsupported type '%s', expecting '%s' "
_
(
"%s cdrom '%s' has unsupported type '%s', expecting '%s' "
"or '%s'"
),
busName
,
def
->
dst
,
"or '%s'"
),
busName
,
def
->
dst
,
virDomainDiskTypeToString
(
def
->
type
),
virDomainDiskTypeToString
(
def
->
type
),
...
@@ -3454,7 +3454,7 @@ virVMXFormatFloppy(virVMXContext *ctx, virDomainDiskDefPtr def,
...
@@ -3454,7 +3454,7 @@ virVMXFormatFloppy(virVMXContext *ctx, virDomainDiskDefPtr def,
unit
,
def
->
src
);
unit
,
def
->
src
);
}
}
}
else
{
}
else
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Floppy '%s' has unsupported type '%s', expecting '%s' "
_
(
"Floppy '%s' has unsupported type '%s', expecting '%s' "
"or '%s'"
),
def
->
dst
,
"or '%s'"
),
def
->
dst
,
virDomainDiskTypeToString
(
def
->
type
),
virDomainDiskTypeToString
(
def
->
type
),
...
@@ -3528,7 +3528,7 @@ virVMXFormatEthernet(virDomainNetDefPtr def, int controller,
...
@@ -3528,7 +3528,7 @@ virVMXFormatEthernet(virDomainNetDefPtr def, int controller,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
_
(
"Unsupported net type '%s'"
),
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported net type '%s'"
),
virDomainNetTypeToString
(
def
->
type
));
virDomainNetTypeToString
(
def
->
type
));
return
-
1
;
return
-
1
;
}
}
...
@@ -3643,7 +3643,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDefPtr def,
...
@@ -3643,7 +3643,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDefPtr def,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported character device TCP protocol '%s'"
),
_
(
"Unsupported character device TCP protocol '%s'"
),
virDomainChrTcpProtocolTypeToString
(
virDomainChrTcpProtocolTypeToString
(
def
->
source
.
data
.
tcp
.
protocol
));
def
->
source
.
data
.
tcp
.
protocol
));
...
@@ -3661,7 +3661,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDefPtr def,
...
@@ -3661,7 +3661,7 @@ virVMXFormatSerial(virVMXContext *ctx, virDomainChrDefPtr def,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported character device type '%s'"
),
_
(
"Unsupported character device type '%s'"
),
virDomainChrTypeToString
(
def
->
source
.
type
));
virDomainChrTypeToString
(
def
->
source
.
type
));
return
-
1
;
return
-
1
;
...
@@ -3719,7 +3719,7 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
...
@@ -3719,7 +3719,7 @@ virVMXFormatParallel(virVMXContext *ctx, virDomainChrDefPtr def,
break
;
break
;
default:
default:
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported character device type '%s'"
),
_
(
"Unsupported character device type '%s'"
),
virDomainChrTypeToString
(
def
->
source
.
type
));
virDomainChrTypeToString
(
def
->
source
.
type
));
return
-
1
;
return
-
1
;
...
@@ -3734,7 +3734,7 @@ int
...
@@ -3734,7 +3734,7 @@ int
virVMXFormatSVGA
(
virDomainVideoDefPtr
def
,
virBufferPtr
buffer
)
virVMXFormatSVGA
(
virDomainVideoDefPtr
def
,
virBufferPtr
buffer
)
{
{
if
(
def
->
type
!=
VIR_DOMAIN_VIDEO_TYPE_VMVGA
)
{
if
(
def
->
type
!=
VIR_DOMAIN_VIDEO_TYPE_VMVGA
)
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
_
(
"Unsupported video device type '%s'"
),
_
(
"Unsupported video device type '%s'"
),
virDomainVideoTypeToString
(
def
->
type
));
virDomainVideoTypeToString
(
def
->
type
));
return
-
1
;
return
-
1
;
...
@@ -3751,7 +3751,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
...
@@ -3751,7 +3751,7 @@ virVMXFormatSVGA(virDomainVideoDefPtr def, virBufferPtr buffer)
}
}
if
(
def
->
heads
>
1
)
{
if
(
def
->
heads
>
1
)
{
VMX_ERROR
(
VIR_ERR_
INTERNAL_ERROR
,
"%s"
,
VMX_ERROR
(
VIR_ERR_
CONFIG_UNSUPPORTED
,
"%s"
,
_
(
"Multi-head video devices are unsupported"
));
_
(
"Multi-head video devices are unsupported"
));
return
-
1
;
return
-
1
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录