[PATCH 6/7] Don't try to teardown the live device or associated loop devices.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This also has the side-effect of not tearing down any other loop
devices, aside from those associated with disk image files.
---
 pyanaconda/storage/devicetree.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index af1ce33..f7bca81 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -679,6 +679,7 @@ class DeviceTree(object):
                                   sysfsPath=sysfs_path, exists=True,
                                   parents=[slave_dev])
                 device.protected = True
+                device.controllable = False
                 self._addDevice(device)
 
             # if we get here, we found all of the slave devices and
@@ -891,6 +892,11 @@ class DeviceTree(object):
                             parents=[file_device],
                             sysfsPath=sysfs_path,
                             exists=True)
+        if not self._cleanup or file_device not in self.diskImages.values():
+            # don't allow manipulation of loop devices other than those
+            # associated with disk images, and then only during cleanup
+            file_device.controllable = False
+            device.controllable = False
         self._addDevice(device)
         return device
 
-- 
1.7.3.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux