mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
vz: handle sourceless cdroms
SDK handles empty cdroms all right. We just need to pass "" instead of NULL (not setting is good too). However we can get problems here. Disk detaching treats source as ids. Fortunately disk detaching is not supported for cdroms yet and for hard disks we can not get empty source - this is prohibitited by xml parsing code. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com> Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
This commit is contained in:
parent
caff6b8043
commit
071fe09260
@ -3216,11 +3216,13 @@ static int prlsdkAddDisk(vzDriverPtr driver,
|
||||
pret = PrlVmDev_SetEmulatedType(sdkdisk, emutype);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
|
||||
pret = PrlVmDev_SetSysName(sdkdisk, path);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
if (disk->src->path) {
|
||||
pret = PrlVmDev_SetSysName(sdkdisk, path);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
|
||||
pret = PrlVmDev_SetFriendlyName(sdkdisk, path);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
pret = PrlVmDev_SetFriendlyName(sdkdisk, path);
|
||||
prlsdkCheckRetGoto(pret, cleanup);
|
||||
}
|
||||
|
||||
drive = &disk->info.addr.drive;
|
||||
if (drive->controller > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user