[anaconda-storage-branch PATCH 5/6] Mount existing filesystems read-only when getting size.

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

 



Pass 'ro' in the mount options.  Also add a hyphen in the temporary
mount point name so it looks like 'getsize-XXXXXX'.
---
 storage/formats/fs.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/storage/formats/fs.py b/storage/formats/fs.py
index ac2d9b5..a32c65b 100644
--- a/storage/formats/fs.py
+++ b/storage/formats/fs.py
@@ -202,8 +202,8 @@ class FS(DeviceFormat):
         if self.mountable:
             origMountPoint = self._mountpoint
 
-            tmppath = tempfile.mkdtemp(prefix='getsize', dir='/tmp')
-            self.mount(mountpoint=tmppath)
+            tmppath = tempfile.mkdtemp(prefix='getsize-', dir='/tmp')
+            self.mount(mountpoint=tmppath, options="ro")
             buf = os.statvfs(tmppath)
             self.unmount()
 
-- 
1.6.2

_______________________________________________
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