[blivet:master 09/17] Simplify TmpFS.resizeArgs() just a bit.
mulhern
amulhern at redhat.com
Tue Jan 6 20:38:11 UTC 2015
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/formats/fs.py | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index c34df53..b366706 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1667,15 +1667,8 @@ class TmpFS(NoDevFS):
def resizeArgs(self):
# a live tmpfs mount can be resized by remounting it with
# the mount command
-
- # add the remount flag, size and any options
- size_option = self._sizeOption(self.targetSize)
- remount_options = "%s,%s" % ("remount", size_option)
-
- # if any mount options are defined, append them
- if self._options:
- remount_options = "%s,%s" % (remount_options, self._options)
- return ['-o', remount_options, self._type, self._mountpoint]
+ options = (o for o in ("remount", self._sizeOption(self.targetSize), self._options) if o)
+ return ['-o', ",".join(options), self._type, self._mountpoint]
def doResize(self):
# we need to override doResize, because the
--
1.9.3
More information about the anaconda-patches
mailing list