virt-manager/53047595-calculate-disk-bus-properly.patch

23 lines
783 B
Diff
Raw Normal View History

Subject: disk: calculate the disk bus properly
From: Martin Kletzander mkletzan@redhat.com Wed Feb 19 10:12:46 2014 +0100
Date: Wed Feb 19 10:12:53 2014 +0100:
Git: 466c2bcf9cb07f16690cb41684d67d0265d2d47e
I forgot to amend this change when changing it the last time.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
diff --git a/virtinst/devicedisk.py b/virtinst/devicedisk.py
index 6e7c6c8..9ebcc11 100644
--- a/virtinst/devicedisk.py
+++ b/virtinst/devicedisk.py
@@ -484,7 +484,7 @@ class VirtualDisk(VirtualDevice):
# This case is here for 'xvda'
tgt = tgt[1:]
for i, c in enumerate(reversed(tgt[2:])):
- num += (ord(c) - ord('a') + 1) * (26 ** i)
+ num += (ord(c) - ord('a')) * (26 ** i)
return num