[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 2/2] If a block device is read-only, throw it out of the deviceList (#471883).
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 2/2] If a block device is read-only, throw it out of the deviceList (#471883).
- Date: Wed, 22 Jul 2009 15:57:35 -0400
This means that all read-only devices (USB keys, floppies, whatever) will
be completely skipped by anaconda. The advantage is we won't get parted
error dialogs for them. Also, read-only block devices are probably far
less common than read-only filesystems so throwing them out shouldn't cause
too many problems.
---
isys/isys.py | 2 +-
partedUtils.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/isys/isys.py b/isys/isys.py
index 189a6c1..6312ba8 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -300,7 +300,7 @@ def driveDict(klassArg):
devName = "/dev/%s" % (device,)
makeDevInode(device, devName)
- if not mediaPresent (device):
+ if not mediaPresent (device) or deviceIsReadOnly(device):
new[device] = dev
continue
diff --git a/partedUtils.py b/partedUtils.py
index f2bd909..9c9cd33 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -1223,7 +1223,7 @@ class DiskSet:
if (DiskSet.exclusiveDisks != [] and drive not in DiskSet.exclusiveDisks) or drive in DiskSet.skippedDisks:
continue
deviceFile = isys.makeDevInode(drive, "/dev/" + drive)
- if not isys.mediaPresent(drive):
+ if not isys.mediaPresent(drive) or isys.deviceIsReadOnly(drive):
self._removeDisk(drive)
continue
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]