diff options
author | David Lehman <dlehman@redhat.com> | 2010-01-06 19:05:43 -0600 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2010-01-13 11:02:53 -0600 |
commit | 27a32ae1ed56c60b34b59fc0981d273759913d68 (patch) | |
tree | 2a02950c75f0881479dd2e90848d0774b6bb95cb /storage | |
parent | f9d994cb20c0ec0c88d66837bdd6733c26ef965f (diff) | |
download | anaconda-27a32ae1ed56c60b34b59fc0981d273759913d68.tar.gz anaconda-27a32ae1ed56c60b34b59fc0981d273759913d68.tar.xz anaconda-27a32ae1ed56c60b34b59fc0981d273759913d68.zip |
Don't include read-only filesystems in fsFreeSpace. (#540525)
Diffstat (limited to 'storage')
-rw-r--r-- | storage/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/__init__.py b/storage/__init__.py index eb4d69faf..f520cd936 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 @@ -1671,6 +1672,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))) |