From 27a32ae1ed56c60b34b59fc0981d273759913d68 Mon Sep 17 00:00:00 2001 From: David Lehman Date: Wed, 6 Jan 2010 19:05:43 -0600 Subject: Don't include read-only filesystems in fsFreeSpace. (#540525) --- storage/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'storage/__init__.py') 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))) -- cgit