mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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.
This commit is contained in:
parent
e8528f03f9
commit
23be018d4f
1 changed files with 8 additions and 6 deletions
|
@ -262,14 +262,16 @@ (define (bcachefs-superblock-volume-name sblock)
|
||||||
|
|
||||||
(define (check-bcachefs-file-system device)
|
(define (check-bcachefs-file-system device)
|
||||||
"Return the health of a bcachefs file system on 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"
|
(apply system* "bcachefs" "fsck" "-p" "-v"
|
||||||
;; Make each multi-device member a separate argument.
|
;; Make each multi-device member a separate argument.
|
||||||
(string-split device #\:)))
|
(string-split device #\:)))))
|
||||||
(0 'pass)
|
(match (logand (lognot ignored-bits) status)
|
||||||
(1 'errors-corrected)
|
(0 'pass)
|
||||||
(2 'reboot-required)
|
(1 'errors-corrected)
|
||||||
(_ 'fatal-error)))
|
(_ 'fatal-error))))
|
||||||
|
|
||||||
|
|
||||||
;;;
|
;;;
|
||||||
|
|
Loading…
Reference in a new issue