[blivet:master 10/17] Substitute FS.mountopts for TmpFS._options instance variable.

mulhern amulhern at redhat.com
Tue Jan 6 20:38:12 UTC 2015


It seems like they do the same thing.

Eliminate TmpFS._setOptions() as well, since it is now unnecessary.

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 b366706..e705cc8 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -1578,11 +1578,7 @@ class TmpFS(NoDevFS):
         # if no size is specified, tmpfs will by default
         # be limited to half of the system RAM
         # (sizes of all tmpfs mounts are independent)
-        fsoptions = kwargs.get("mountopts")
         self._size_option = ""
-        if fsoptions:
-            # some mount options were specified, replace the default value
-            self._options = fsoptions
         if self._size:
             # absolute size for the tmpfs mount has been specified
             self._size_option = self._sizeOption(self._size)
@@ -1622,12 +1618,9 @@ class TmpFS(NoDevFS):
         # when the filesystem is resized;
         # replacing the size option in the otherwise free-form
         # options string would get messy fast)
-        opts = ",".join([o for o in [self._options, self._size_option] if o])
+        opts = ",".join([o for o in [self.mountopts, self._size_option] if o])
         return opts or "defaults"
 
-    def _setOptions(self, options):
-        self._options = options
-
     @property
     def size(self):
         return self._size
@@ -1667,7 +1660,7 @@ class TmpFS(NoDevFS):
     def resizeArgs(self):
         # a live tmpfs mount can be resized by remounting it with
         # the mount command
-        options = (o for o in ("remount", self._sizeOption(self.targetSize), self._options) if o)
+        options = (o for o in ("remount", self._sizeOption(self.targetSize), self.mountopts) if o)
         return ['-o', ",".join(options), self._type, self._mountpoint]
 
     def doResize(self):
-- 
1.9.3



More information about the anaconda-patches mailing list