diff --git a/plugins/volume_details/language.hdf b/plugins/volume_details/language.hdf
index cd78a80..9f87d4e 100644
--- a/plugins/volume_details/language.hdf
+++ b/plugins/volume_details/language.hdf
@@ -18,5 +18,6 @@ Text {
Avail = Available space of volume
Used = Used space of volume
}
+ Filesystem = Filesystem
}
diff --git a/plugins/volume_details/volume_details.cs b/plugins/volume_details/volume_details.cs
index 4bb2a1a..bb0383d 100644
--- a/plugins/volume_details/volume_details.cs
+++ b/plugins/volume_details/volume_details.cs
@@ -11,6 +11,7 @@
- :
- :
+ - :
- :
- :
diff --git a/src/cryptobox/core/container.py b/src/cryptobox/core/container.py
index 199c5c3..0185c38 100644
--- a/src/cryptobox/core/container.py
+++ b/src/cryptobox/core/container.py
@@ -60,6 +60,7 @@ class CryptoBoxContainer:
self.uuid = None
self.name = None
self.cont_type = None
+ self.fs_type = None
self.mount = None
self.umount = None
self.attributes = None
@@ -159,6 +160,14 @@ class CryptoBoxContainer:
return self.cont_type
+ def get_fs_type(self):
+ """Return the filesystem type of this container.
+
+ Available since: 0.3.0
+ """
+ return self.fs_type
+
+
def is_mounted(self):
"""Check if the container is currently mounted.
@@ -201,6 +210,7 @@ class CryptoBoxContainer:
"""
self.uuid = self.__get_uuid()
self.cont_type = self.__get_type_of_partition()
+ self.fs_type = self.__get_fs_type()
self.name = self.__get_name_of_container()
self.__set_attributes()
if self.cont_type == CONTAINERTYPES["luks"]:
@@ -441,6 +451,26 @@ class CryptoBoxContainer:
return None
+ def __get_fs_type(self):
+ "returns the filesystem used on a container"
+ #TODO: with a luks volume use the mapping instead of the device
+ proc = subprocess.Popen(
+ shell = False,
+ stdout = subprocess.PIPE,
+ stderr = subprocess.PIPE,
+ args = [ self.cbox.prefs["Programs"]["blkid"],
+ "-s","TYPE",
+ self.device ])
+ (stdout, stderr) = proc.communicate()
+ if proc.returncode == 0:
+ return stdout.split("TYPE=")[1]
+ else:
+ self.cbox.log.warn("filesystem determination failed: %s" % \
+ (stderr.strip(), ))
+ return "undetermined"
+ return
+
+
def __is_luks_partition(self):
"check if the given device is a luks partition"
proc = subprocess.Popen(
diff --git a/src/cryptobox/web/dataset.py b/src/cryptobox/web/dataset.py
index bce10a1..8df8290 100644
--- a/src/cryptobox/web/dataset.py
+++ b/src/cryptobox/web/dataset.py
@@ -137,6 +137,7 @@ class WebInterfaceDataset(dict):
is_busy = container.is_busy() and 1 or 0
self["Data.CurrentDisk.device"] = container.get_device()
self["Data.CurrentDisk.name"] = container.get_name()
+ self["Data.CurrentDisk.fs_type"] = container.get_fs_type()
self["Data.CurrentDisk.encryption"] = is_encrypted
self["Data.CurrentDisk.plaintext"] = is_plain
self["Data.CurrentDisk.active"] = is_mounted