[PATCH 2/2] Don't include read-only filesystems in fsFreeSpace. (#540525)

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

 



---
 storage/__init__.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index d50987d..3eb1f66 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -25,6 +25,7 @@ import time
 import stat
 import errno
 import sys
+import statvfs
 
 import nss.nss
 import parted
@@ -1667,6 +1668,11 @@ class FSSet(object):
                 continue
 
             path = "%s/%s" % (chroot, device.format.mountpoint)
+
+            ST_RDONLY = 1   # this should be in python's posix module
+            if os.statvfs(path)[statvfs.F_FLAG] & ST_RDONLY:
+                continue
+
             try:
                 space.append((device.format.mountpoint,
                               isys.pathSpaceAvailable(path)))
-- 
1.6.5.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