diff --git a/storage/devicelibs/edd.py b/storage/devicelibs/edd.py
index 86abca4..d494ec2 100644
--- a/storage/devicelibs/edd.py
+++ b/storage/devicelibs/edd.py
@@ -218,7 +218,7 @@ def get_edd_dict(devices):
old_edd_number = edd_dict.get(name)
if old_edd_number:
log.info("edd: both edd entries 0x%x and 0x%x seem to map to %s" %
- old_edd_number, edd_number, name)
+ (old_edd_number, edd_number, name))
# this means all the other data can be confused and useless
return {}
edd_dict[name] = edd_number
diff --git a/tests/storage/devicelibs/edd_test.py b/tests/storage/devicelibs/edd_test.py
index 00a91b4..60b1e43 100644
--- a/tests/storage/devicelibs/edd_test.py
+++ b/tests/storage/devicelibs/edd_test.py
@@ -102,6 +102,21 @@ class EddTestCase(mock.TestCase):
{'sda' : 0x80,
'vda' : 0x81})
+ def test_get_edd_dict_3(self):
+ """ Test scenario when the 0x80 and 0x81 edd directories contain the
+ same data and give no way to distinguish among the two devices.
+ """
+ from storage.devicelibs import edd
+ edd.log = mock.Mock()
+ edd.collect_mbrs = mock.Mock(return_value = {
+ 'sda' : '0x000ccb01',
+ 'vda' : '0x0006aef1'})
+ fs = EddTestFS(edd).sda_sdb_same()
+ self.assertEqual(edd.get_edd_dict([]),
+ {})
+ self.assertIn((('edd: both edd entries 0x80 and 0x81 seem to map to sda',), {}),
+ edd.log.info.call_args_list)
+
class EddTestFS(object):
def __init__(self, target_module):
self.fs = mock.DiskIO()
@@ -161,3 +176,19 @@ class EddTestFS(object):
self.fs["/sys/firmware/edd/int13_dev81/sectors"] = "4194304
"