Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
24b1bad3
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看板
提交
24b1bad3
编写于
8月 22, 2014
作者:
A
Alexander Burluka
提交者:
Ján Tomko
8月 22, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Parallels: Change config report errors code.
Wrong error code in config errors reporting was used. Fixed it.
上级
268b4c84
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
41 addition
and
40 deletion
+41
-40
src/parallels/parallels_driver.c
src/parallels/parallels_driver.c
+41
-40
未找到文件。
src/parallels/parallels_driver.c
浏览文件 @
24b1bad3
...
...
@@ -1532,7 +1532,7 @@ parallelsApplyGraphicsParams(virDomainGraphicsDefPtr *oldgraphics, int nold,
return
0
;
error:
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing display parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -1580,7 +1580,7 @@ parallelsApplySerialParams(virDomainChrDefPtr *oldserials, int nold,
return
0
;
error:
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing serial device parameters is "
"not supported by parallels driver"
));
return
-
1
;
...
...
@@ -1595,7 +1595,7 @@ parallelsApplyVideoParams(parallelsDomObjPtr pdom,
char
str_vram
[
32
];
if
(
nold
!=
1
||
nnew
!=
1
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Only one video device is "
"supported by parallels driver"
));
return
-
1
;
...
...
@@ -1604,14 +1604,14 @@ parallelsApplyVideoParams(parallelsDomObjPtr pdom,
old
=
oldvideos
[
0
];
new
=
newvideos
[
0
];
if
(
new
->
type
!=
VIR_DOMAIN_VIDEO_TYPE_VGA
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Only VGA video device is "
"supported by parallels driver"
));
return
-
1
;
}
if
(
new
->
heads
!=
1
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Only one monitor is supported by parallels driver"
));
return
-
1
;
}
...
...
@@ -1621,15 +1621,16 @@ parallelsApplyVideoParams(parallelsDomObjPtr pdom,
old
->
accel
->
support2d
!=
new
->
accel
->
support2d
||
old
->
accel
->
support3d
!=
new
->
accel
->
support3d
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing video acceleration parameters is "
"not supported by parallels driver"
));
return
-
1
;
}
if
(
old
->
vram
!=
new
->
vram
)
{
if
(
new
->
vram
%
(
1
<<
10
)
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Video RAM size should be multiple of 1Mb."
));
return
-
1
;
}
...
...
@@ -1659,7 +1660,7 @@ static int parallelsAddHdd(parallelsDomObjPtr pdom,
int
format
=
virDomainDiskGetFormat
(
disk
);
if
(
format
!=
VIR_STORAGE_FILE_PLOOP
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
_
(
"Invalid disk format: %d"
),
type
);
goto
cleanup
;
}
...
...
@@ -1668,7 +1669,7 @@ static int parallelsAddHdd(parallelsDomObjPtr pdom,
}
else
if
(
VIR_STORAGE_TYPE_BLOCK
)
{
virCommandAddArg
(
cmd
,
"--device"
);
}
else
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
_
(
"Invalid disk type: %d"
),
type
);
goto
cleanup
;
}
...
...
@@ -1676,7 +1677,7 @@ static int parallelsAddHdd(parallelsDomObjPtr pdom,
virCommandAddArg
(
cmd
,
src
);
if
(
!
(
strbus
=
parallelsGetDiskBusName
(
disk
->
bus
)))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
_
(
"Invalid disk bus: %d"
),
disk
->
bus
);
goto
cleanup
;
}
...
...
@@ -1732,7 +1733,7 @@ parallelsApplyDisksParams(parallelsDomObjPtr pdom,
if
(
!
newdisk
)
{
if
(
parallelsRemoveHdd
(
pdom
,
olddisk
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
_
(
"Can't remove disk '%s' "
"in the specified config"
),
olddisks
[
i
]
->
serial
);
return
-
1
;
...
...
@@ -1757,7 +1758,7 @@ parallelsApplyDisksParams(parallelsDomObjPtr pdom,
snprintf
(
strpos
,
15
,
"%d"
,
newdisk
->
info
.
addr
.
drive
.
target
);
if
(
!
(
strbus
=
parallelsGetDiskBusName
(
newdisk
->
bus
)))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
_
(
"Unsupported disk bus: %d"
),
newdisk
->
bus
);
return
-
1
;
}
...
...
@@ -1805,58 +1806,58 @@ static int parallelsApplyIfaceParams(parallelsDomObjPtr pdom,
}
if
(
!
create
&&
oldnet
->
type
!=
newnet
->
type
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing network type is not supported"
));
goto
cleanup
;
}
if
(
!
STREQ_NULLABLE
(
oldnet
->
model
,
newnet
->
model
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing network device model is not supported"
));
goto
cleanup
;
}
if
(
!
STREQ_NULLABLE
(
oldnet
->
data
.
network
.
portgroup
,
newnet
->
data
.
network
.
portgroup
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing network portgroup is not supported"
));
goto
cleanup
;
}
if
(
!
virNetDevVPortProfileEqual
(
oldnet
->
virtPortProfile
,
newnet
->
virtPortProfile
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing virtual port profile is not supported"
));
goto
cleanup
;
}
if
(
newnet
->
tune
.
sndbuf_specified
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Setting send buffer size is not supported"
));
goto
cleanup
;
}
if
(
!
STREQ_NULLABLE
(
oldnet
->
script
,
newnet
->
script
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Setting startup script is not supported"
));
goto
cleanup
;
}
if
(
!
STREQ_NULLABLE
(
oldnet
->
filter
,
newnet
->
filter
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Changing filter params is not supported"
));
goto
cleanup
;
}
if
(
newnet
->
bandwidth
!=
NULL
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Setting bandwidth params is not supported"
));
goto
cleanup
;
}
for
(
i
=
0
;
i
<
sizeof
(
newnet
->
vlan
);
i
++
)
{
if
(((
char
*
)
&
newnet
->
vlan
)[
i
]
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Setting vlan params is not supported"
));
goto
cleanup
;
}
...
...
@@ -1989,13 +1990,13 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
}
if
(
new
->
title
&&
!
STREQ_NULLABLE
(
old
->
title
,
new
->
title
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"titles are not supported by parallels driver"
));
return
-
1
;
}
if
(
new
->
blkio
.
ndevices
>
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"blkio parameters are not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2003,14 +2004,14 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
if
(
old
->
mem
.
max_balloon
!=
new
->
mem
.
max_balloon
)
{
if
(
new
->
mem
.
max_balloon
!=
new
->
mem
.
cur_balloon
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing balloon parameters is not supported "
"by parallels driver"
));
return
-
1
;
}
if
(
new
->
mem
.
max_balloon
%
(
1
<<
10
)
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Memory size should be multiple of 1Mb."
));
return
-
1
;
}
...
...
@@ -2029,7 +2030,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
old
->
mem
.
min_guarantee
!=
new
->
mem
.
min_guarantee
||
old
->
mem
.
swap_hard_limit
!=
new
->
mem
.
swap_hard_limit
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"Memory parameter is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2037,7 +2038,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
if
(
old
->
vcpus
!=
new
->
vcpus
)
{
if
(
new
->
vcpus
!=
new
->
maxvcpus
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"current vcpus must be equal to maxvcpus"
));
return
-
1
;
}
...
...
@@ -2051,7 +2052,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
}
if
(
old
->
placement_mode
!=
new
->
placement_mode
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing cpu placement mode is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2061,7 +2062,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
(
old
->
cpumask
==
NULL
||
new
->
cpumask
==
NULL
||
!
virBitmapEqual
(
old
->
cpumask
,
new
->
cpumask
)))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing cpu mask is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2073,13 +2074,13 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
old
->
cputune
.
quota
!=
new
->
cputune
.
quota
||
old
->
cputune
.
nvcpupin
!=
new
->
cputune
.
nvcpupin
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"cputune is not supported by parallels driver"
));
return
-
1
;
}
if
(
!
virDomainNumatuneEquals
(
old
->
numatune
,
new
->
numatune
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"numa parameters are not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2089,7 +2090,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
old
->
onPoweroff
!=
new
->
onPoweroff
||
old
->
onCrash
!=
new
->
onCrash
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"on_reboot, on_poweroff and on_crash parameters "
"are not supported by parallels driver"
));
return
-
1
;
...
...
@@ -2108,7 +2109,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
new
->
os
.
bootloaderArgs
!=
NULL
||
new
->
os
.
smbios_mode
!=
0
||
new
->
os
.
bios
.
useserial
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing OS parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2118,7 +2119,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
new
->
os
.
bootDevs
[
0
]
!=
VIR_DOMAIN_BOOT_DISK
||
new
->
os
.
init
!=
NULL
||
new
->
os
.
initargv
!=
NULL
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing OS parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2128,7 +2129,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
!
STREQ_NULLABLE
(
old
->
os
.
init
,
new
->
os
.
init
)
||
(
new
->
os
.
initargv
!=
NULL
&&
new
->
os
.
initargv
[
0
]
!=
NULL
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing OS parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2137,7 +2138,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
if
(
!
STREQ_NULLABLE
(
old
->
emulator
,
new
->
emulator
))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing emulator is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2145,7 +2146,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
for
(
i
=
0
;
i
<
VIR_DOMAIN_FEATURE_LAST
;
i
++
)
{
if
(
old
->
features
[
i
]
!=
new
->
features
[
i
])
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing features is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2155,7 +2156,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
if
(
new
->
clock
.
offset
!=
VIR_DOMAIN_CLOCK_OFFSET_UTC
||
new
->
clock
.
ntimers
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing clock parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2171,7 +2172,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
new
->
nparallels
||
new
->
nchannels
!=
0
||
new
->
nleases
!=
0
||
new
->
nhubs
!=
0
)
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing devices parameters is not supported "
"by parallels driver"
));
return
-
1
;
...
...
@@ -2183,7 +2184,7 @@ parallelsApplyChanges(virDomainObjPtr dom, virDomainDefPtr new)
(
new
->
inputs
[
0
]
->
type
!=
VIR_DOMAIN_INPUT_TYPE_MOUSE
||
new
->
inputs
[
0
]
->
bus
!=
VIR_DOMAIN_INPUT_BUS_PS2
)))
{
virReportError
(
VIR_ERR_
ARGUMENT
_UNSUPPORTED
,
"%s"
,
virReportError
(
VIR_ERR_
CONFIG
_UNSUPPORTED
,
"%s"
,
_
(
"changing input devices parameters is not supported "
"by parallels driver"
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录