[master 28/30] Add error identification for HFSPlusFSCK.
mulkieran
installerbot-noreply at redhat.com
Wed Mar 25 22:48:06 UTC 2015
From: mulhern <amulhern at 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 at 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"
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/b71b73c6e9a958398af8faf7bca2d154878c65e6
More information about the anaconda-patches
mailing list