908926225e
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=146ca798b89e562a00f77a0bede15da3
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
Index: virtinst-0.500.0/virtinst/VirtualDisk.py
|
|
===================================================================
|
|
--- virtinst-0.500.0.orig/virtinst/VirtualDisk.py
|
|
+++ virtinst-0.500.0/virtinst/VirtualDisk.py
|
|
@@ -1181,14 +1181,18 @@ class VirtualDisk(VirtualDevice):
|
|
return self.target
|
|
raise ValueError(_("IDE CDROM must use 'hdc', but target in use."))
|
|
|
|
- # Regular scanning
|
|
+ # Start cdrom at 'c' and skip 'c' for non-cdrom
|
|
for i in range(maxnode):
|
|
gen_t = "%s%c" % (prefix, ord('a') + i)
|
|
- if gen_t in except_targets:
|
|
- continue
|
|
if gen_t not in skip_targets:
|
|
- self.target = gen_t
|
|
- return self.target
|
|
+ if self.device != self.DEVICE_CDROM:
|
|
+ if i != ord('c') - ord('a'):
|
|
+ self.target = gen_t
|
|
+ return self.target
|
|
+ else:
|
|
+ if i >= ord('c') - ord('a'):
|
|
+ self.target = gen_t
|
|
+ return self.target
|
|
|
|
# Check except_targets for any options
|
|
for t in except_targets:
|