summaryrefslogtreecommitdiffstats
path: root/storage/devicetree.py
diff options
context:
space:
mode:
Diffstat (limited to 'storage/devicetree.py')
-rw-r--r--storage/devicetree.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 109db1a0c..49f551c34 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -972,7 +972,11 @@ class DeviceTree(object):
device = self.getDeviceByName(name)
if device is None:
try:
- cb=lambda:questionInitializeDisk(self.intf, name)
+ if self.zeroMbr:
+ cb = lambda: True
+ else:
+ cb = lambda: questionInitializeDisk(self.intf, name)
+
device = DiskDevice(name,
major=udev_device_get_major(info),
minor=udev_device_get_minor(info),
@@ -1149,7 +1153,11 @@ class DeviceTree(object):
# Create the DMRaidArray
try:
- cb=lambda:questionInitializeDisk(self.intf,rs.name)
+ if self.zeroMbr:
+ cb = lambda: True
+ else:
+ cb = lambda: questionInitializeDisk(self.intf,
+ rs.name)
dm_array = DMRaidArrayDevice(rs.name,
major=major, minor=minor,
raidSet=rs,