From: mulhern amulhern@redhat.com
Previously, HFSPlusFSCK always considered fsck operation to have succeeded. Now it checkes for an error and behaves essentially like the other FSCK tasks.
Signed-off-by: mulhern amulhern@redhat.com --- blivet/tasks/fsck.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/blivet/tasks/fsck.py b/blivet/tasks/fsck.py index 2ada93c..cbf6d7c 100644 --- a/blivet/tasks/fsck.py +++ b/blivet/tasks/fsck.py @@ -159,12 +159,20 @@ def _errorMessage(self, rc): return "\n".join(msgs) or None
class HFSPlusFSCK(FSCK): + _fsckErrors = {3: "Quick check found a dirty filesystem; no repairs done.", + 4: "Root filesystem was dirty. System should be rebooted.", + 8: "Corrupt filesystem, repairs did not succeed.", + 47: "Major error found; no repairs attempted."} app_name = "fsck.hfsplus" options = []
def _errorMessage(self, rc): - # pylint: disable=unused-argument - return None + if rc < 1: + return None + try: + return self._fsckErrors[rc] + except KeyError: + return _UNKNOWN_RC_MSG % rc
class NTFSFSCK(FSCK): app_name = "ntfsresize"