summaryrefslogtreecommitdiffstats
path: root/storage/formats/fs.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-12-21 19:10:25 -0600
committerDavid Lehman <dlehman@redhat.com>2009-12-22 15:02:36 -0600
commit4b45e3d40784233c1a9c2cd651ea0dff2cf35694 (patch)
tree6ac27a695042c9bd9c80fadf03629b96f686a8cc /storage/formats/fs.py
parentf6f23c29ac4a6a2035bc8a67aafecd41c5414a95 (diff)
downloadanaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.tar.gz
anaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.tar.xz
anaconda-4b45e3d40784233c1a9c2cd651ea0dff2cf35694.zip
Put fsprofile support back in.
Diffstat (limited to 'storage/formats/fs.py')
-rw-r--r--storage/formats/fs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 239386dc3..09e764d5f 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -124,6 +124,7 @@ class FS(DeviceFormat):
_defaultInfoOptions = []
_migrationTarget = None
_existingSizeFields = []
+ _fsProfileSpecifier = None # mkfs option specifying fsprofile
def __init__(self, *args, **kwargs):
""" Create a FS instance.
@@ -143,10 +144,10 @@ class FS(DeviceFormat):
raise TypeError("FS is an abstract class.")
DeviceFormat.__init__(self, *args, **kwargs)
- # TODO: fsprofiles and other ways to add format args
self.mountpoint = kwargs.get("mountpoint")
self.mountopts = kwargs.get("mountopts")
self.label = kwargs.get("label")
+ self.fsprofile = kwargs.get("fsprofile")
# filesystem size does not necessarily equal device size
self._size = kwargs.get("size", 0)
@@ -297,6 +298,8 @@ class FS(DeviceFormat):
if options and isinstance(options, list):
argv.extend(options)
argv.extend(self.defaultFormatOptions)
+ if self._fsProfileSpecifier and self.fsprofile:
+ argv.extend([self._fsProfileSpecifier, self.fsprofile])
argv.append(self.device)
return argv
@@ -872,6 +875,7 @@ class Ext2FS(FS):
_infofs = "dumpe2fs"
_defaultInfoOptions = ["-h"]
_existingSizeFields = ["Block count:", "Block size:"]
+ _fsProfileSpecifier = "-T"
partedSystem = fileSystemType["ext2"]
def _fsckFailed(self, rc):