file-systems: 'file-system-needed-for-boot?' always returns #t for "/".
Reported by Nikita Karetnikov. * gnu/system/file-systems.scm (<file-system>): Rename 'needed-for-boot?' accessor to '%file-system-needed-for-boot?'. (file-system-needed-for-boot?): New inlinable procedure. * gnu/system.scm (other-file-system-services)[file-systems]: Rely on 'file-system-needed-for-boot?' to handle the "/" case. (operating-system-initrd-file)[boot-file-systems]: Likewise.
This commit is contained in:
parent
6eef465eea
commit
4d6b879cb5
|
@ -204,9 +204,7 @@ file."
|
||||||
"Return file system services for the file systems of OS that are not marked
|
"Return file system services for the file systems of OS that are not marked
|
||||||
as 'needed-for-boot'."
|
as 'needed-for-boot'."
|
||||||
(define file-systems
|
(define file-systems
|
||||||
(remove (lambda (fs)
|
(remove file-system-needed-for-boot?
|
||||||
(or (file-system-needed-for-boot? fs)
|
|
||||||
(string=? "/" (file-system-mount-point fs))))
|
|
||||||
(operating-system-file-systems os)))
|
(operating-system-file-systems os)))
|
||||||
|
|
||||||
(define (device-mappings fs)
|
(define (device-mappings fs)
|
||||||
|
@ -638,12 +636,7 @@ we're running in the final root."
|
||||||
(define (operating-system-initrd-file os)
|
(define (operating-system-initrd-file os)
|
||||||
"Return a gexp denoting the initrd file of OS."
|
"Return a gexp denoting the initrd file of OS."
|
||||||
(define boot-file-systems
|
(define boot-file-systems
|
||||||
(filter (match-lambda
|
(filter file-system-needed-for-boot?
|
||||||
(($ <file-system> device title "/")
|
|
||||||
#t)
|
|
||||||
(($ <file-system> device title mount-point type flags
|
|
||||||
options boot?)
|
|
||||||
boot?))
|
|
||||||
(operating-system-file-systems os)))
|
(operating-system-file-systems os)))
|
||||||
|
|
||||||
(define mapped-devices
|
(define mapped-devices
|
||||||
|
|
|
@ -70,13 +70,19 @@
|
||||||
(default '()))
|
(default '()))
|
||||||
(options file-system-options ; string or #f
|
(options file-system-options ; string or #f
|
||||||
(default #f))
|
(default #f))
|
||||||
(needed-for-boot? file-system-needed-for-boot? ; Boolean
|
(needed-for-boot? %file-system-needed-for-boot? ; Boolean
|
||||||
(default #f))
|
(default #f))
|
||||||
(check? file-system-check? ; Boolean
|
(check? file-system-check? ; Boolean
|
||||||
(default #t))
|
(default #t))
|
||||||
(create-mount-point? file-system-create-mount-point? ; Boolean
|
(create-mount-point? file-system-create-mount-point? ; Boolean
|
||||||
(default #f)))
|
(default #f)))
|
||||||
|
|
||||||
|
(define-inlinable (file-system-needed-for-boot? fs)
|
||||||
|
"Return true if FS has the 'needed-for-boot?' flag set, or if it's the root
|
||||||
|
file system."
|
||||||
|
(or (%file-system-needed-for-boot? fs)
|
||||||
|
(string=? "/" (file-system-mount-point fs))))
|
||||||
|
|
||||||
(define %fuse-control-file-system
|
(define %fuse-control-file-system
|
||||||
;; Control file system for Linux' file systems in user-space (FUSE).
|
;; Control file system for Linux' file systems in user-space (FUSE).
|
||||||
(file-system
|
(file-system
|
||||||
|
|
Loading…
Reference in New Issue