[blivet:rhel7/master 12/16] Add a method that indicates ability to relabel (#1038590)
mulhern
amulhern at redhat.com
Thu Jan 16 16:10:13 UTC 2014
Related: rhbz#1038590
Some filesystems can only be labeled at creation time, others can be
labeled subsequently.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/formats/fs.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
index c365581..8c8300e 100644
--- a/blivet/formats/fs.py
+++ b/blivet/formats/fs.py
@@ -161,6 +161,15 @@ class FS(DeviceFormat):
return cls._labelfs is not None
@classmethod
+ def relabels(cls):
+ """Returns True if it is possible to relabel this filesystem
+ after creation, otherwise False.
+
+ :rtype: bool
+ """
+ return cls._labelfs is not None and cls._labelfs.labelApp is not None
+
+ @classmethod
def labelFormatOK(cls, label):
return cls._labelfs is not None and cls._labelfs.labelFormatOK(label)
--
1.8.3.1
More information about the anaconda-patches
mailing list