virt-manager/virtinst-cdrom.patch
Charles Arnold ae026a575b - Update to virt-manager 0.10.0
* Merged code with python-virtinst. virtinst is no longer public
  * Port from GTK2 to GTK3 (Daniel Berrange, Cole Robinson)
  * Port from gconf to gsettings
  * Port from autotools to python distutils
  * Remove virt-manager-tui
  * Remove HAL support
  * IPv6 and static route virtual network support (Gene Czarcinski)
  * virt-install: Add –cpu host-passthrough (Ken ICHIKAWA, Hu Tao)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=129
2013-11-26 21:23:05 +00:00

31 lines
1.2 KiB
Diff

Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -1712,7 +1712,7 @@ class VirtualDisk(VirtualDevice):
if maxnode > (26 * 26 * 26):
raise RuntimeError("maxnode value is too high")
- # Regular scanning
+ # Start cdrom at 'c' and skip 'c' for non-cdrom
for i in range(1, maxnode + 1):
gen_t = prefix
@@ -1738,8 +1738,14 @@ class VirtualDisk(VirtualDevice):
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: