[PATCH 1/2] Check for fs utils when determining if an fs can be resized (#572431)

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

 



NTFS is not officially supported in RHEL, which means ntfsresize and
other tools are not available in the install media.  To determine if a
filesystem can be resized, we need to check three things:  is _resizable
set to True, does the filesystem exist, and are the filesystem utils
available.  The first two are checked by DeviceFormat.resizable(), make
sure utilsAvailable() is checked in FS.resizable().
---
 storage/formats/fs.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 5531033..ef8e71f 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -740,6 +740,11 @@ class FS(DeviceFormat):
                (os.access("/sbin/mount.%s" % (self.mountType,), os.X_OK))
 
     @property
+    def resizable(self):
+        """ Can formats of this filesystem type be resized? """
+        return super(FS, self).resizable and self.utilsAvailable
+
+    @property
     def defaultFormatOptions(self):
         """ Default options passed to mkfs for this filesystem type. """
         # return a copy to prevent modification
-- 
1.6.6.1

_______________________________________________
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