summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-03-05 10:35:02 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-03-05 10:50:58 -1000
commit36fb5d8e721a32979bc40a999eeee9445eaeaca9 (patch)
tree14f98a31e0f19041847a9febd91d2832cc9fa702 /storage
parenta36096db370416cf336181d8b71428ebec8fb44b (diff)
downloadanaconda-36fb5d8e721a32979bc40a999eeee9445eaeaca9.tar.gz
anaconda-36fb5d8e721a32979bc40a999eeee9445eaeaca9.tar.xz
anaconda-36fb5d8e721a32979bc40a999eeee9445eaeaca9.zip
Add resizeArgs property for resizable filesystems.
Diffstat (limited to 'storage')
-rw-r--r--storage/formats/fs.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index 0f29aa63f..d67dc94d4 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -300,8 +300,9 @@ class FS(DeviceFormat):
# instance of the new filesystem type.
self._type = self.migrationTarget
- def _getResizeArgs(self):
- argv = [self.device, self.targetSize]
+ @property
+ def resizeArgs(self):
+ argv = [self.device, "%d" % (self.targetSize,)]
return argv
def doResize(self, *args, **kwargs):
@@ -336,8 +337,6 @@ class FS(DeviceFormat):
self.doCheck(intf=intf)
- argv = self._getResizeArgs()
-
w = None
if intf:
w = intf.progressWindow(_("Resizing"),
@@ -347,7 +346,7 @@ class FS(DeviceFormat):
try:
rc = iutil.execWithPulseProgress(self.resizefsProg,
- argv,
+ self.resizeArgs,
stdout="/dev/tty5",
stderr="/dev/tty5",
progress=w)
@@ -800,8 +799,9 @@ class BTRFS(FS):
argv.append(self.device)
return argv
- def _getResizeArgs(self):
- argv = ["-r", self.targetSize, self.device]
+ @property
+ def resizeArgs(self):
+ argv = ["-r", "%d" % (self.targetSize,), self.device]
return argv
@property
@@ -941,6 +941,14 @@ class NTFS(FS):
return size
+ @property
+ def resizeArgs(self):
+ # You must supply at least two '-f' options to ntfsresize or
+ # the proceed question will be presented to you.
+ argv = ["-ff", "-s", "%dM" % (self.targetSize,), self.device]
+ return argv
+
+
register_device_format(NTFS)