2011-09-20 17:08:57 +02:00
|
|
|
Index: virtinst-0.600.0/virtinst/VirtualDisk.py
|
2009-09-27 00:17:50 +02:00
|
|
|
===================================================================
|
2011-09-20 17:08:57 +02:00
|
|
|
--- virtinst-0.600.0.orig/virtinst/VirtualDisk.py
|
|
|
|
+++ virtinst-0.600.0/virtinst/VirtualDisk.py
|
|
|
|
@@ -1703,14 +1703,18 @@ class VirtualDisk(VirtualDevice):
|
2010-03-19 18:23:36 +01:00
|
|
|
self.target = "hdc"
|
2009-05-04 18:36:17 +02:00
|
|
|
return self.target
|
|
|
|
|
|
|
|
- # 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:
|