Commits

Rodrigo Bistolfi committed 2a42c21

Added get_mounted to utils.py

Comments (0)

Files changed (1)

vinstall/backend/utils.py

             return False
 
 
+def get_mounted(mountpoint):
+    """Return device for a mountpoint
+    
+    """
+    for line in open("/etc/mtab"):
+        device, mpoint, _ = line.split(" ", 2)
+        if mountpoint == mpoint
+            return device
+
+
 def supported_filesystems():
     """Returns a list of filesystems supported by the system."""