diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-12-06 11:14:48 +0100 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2020-12-06 16:11:43 +0100 |
commit | 23be018d4fe1150ca81efb3572cd695a9044b80d (patch) | |
tree | ff5d809e196b62073c6259e240ace601ac601f01 /gnu/build | |
parent | e8528f03f9b62bb31fe999c873aa4914ac363e7b (diff) | |
download | guix-23be018d4fe1150ca81efb3572cd695a9044b80d.tar guix-23be018d4fe1150ca81efb3572cd695a9044b80d.tar.gz |
file-systems: Fix ‘bcachefs fsck’ exit value logic.
Bit 1 means the target device was mounted read-only whilst checking.
This should never happen in an initrd context but is not an error.
* gnu/build/file-systems.scm (check-bcachefs-file-system): Ignore status
bits that don't signal an error. Remove the 'reboot-required case.
Diffstat (limited to 'gnu/build')
-rw-r--r-- | gnu/build/file-systems.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index b762e82ad2..ddf6117b67 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -262,14 +262,16 @@ bytevector." (define (check-bcachefs-file-system device) "Return the health of a bcachefs file system on DEVICE." - (match (status:exit-val + (let ((ignored-bits (logior 2)) ; DEVICE was mounted read-only + (status + (status:exit-val (apply system* "bcachefs" "fsck" "-p" "-v" ;; Make each multi-device member a separate argument. - (string-split device #\:))) - (0 'pass) - (1 'errors-corrected) - (2 'reboot-required) - (_ 'fatal-error))) + (string-split device #\:))))) + (match (logand (lognot ignored-bits) status) + (0 'pass) + (1 'errors-corrected) + (_ 'fatal-error)))) ;;; |