summaryrefslogtreecommitdiffstats
path: root/isys/isys.py
diff options
context:
space:
mode:
Diffstat (limited to 'isys/isys.py')
-rw-r--r--isys/isys.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/isys/isys.py b/isys/isys.py
index 374282c35..957f0fde2 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -3,6 +3,15 @@ import _isys
import string
import os
+def spaceAvailable(device, fsystem = "ext2"):
+ makeDevInode(device, "/tmp/spaceDev")
+ mount("/tmp/spaceDev", "/mnt/space", fstype = fsystem)
+ space = _isys.devSpaceFree("/mnt/space/.")
+ umount("/mnt/space")
+ os.rmdir("/mnt/space")
+ os.remove("/tmp/spaceDev")
+ return space
+
def raidstop(mdDevice):
makeDevInode(mdDevice, "/tmp/md")
fd = os.open("/tmp/md", os.O_RDONLY)
@@ -26,6 +35,7 @@ def raidsb(mdDevice):
os.close(fd)
return rc
+>>>>>>> 1.24
def losetup(device, file):
loop = os.open(device, os.O_RDONLY)
targ = os.open(file, os.O_RDWR)