diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-11-25 16:01:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-11-25 18:01:59 +0100 |
commit | 4d6b879cb5313c30910330763dca1f1642623c4d (patch) | |
tree | 43f3f88b83cd885377ad2242f2486f3eb1c676d7 /gnu/system/file-systems.scm | |
parent | 6eef465eeaf762d99301a94a8a95670356c39778 (diff) | |
download | guix-4d6b879cb5313c30910330763dca1f1642623c4d.tar guix-4d6b879cb5313c30910330763dca1f1642623c4d.tar.gz |
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.
Diffstat (limited to 'gnu/system/file-systems.scm')
-rw-r--r-- | gnu/system/file-systems.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index ed9d70587f..4760821840 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -70,13 +70,19 @@ (default '())) (options file-system-options ; string or #f (default #f)) - (needed-for-boot? file-system-needed-for-boot? ; Boolean + (needed-for-boot? %file-system-needed-for-boot? ; Boolean (default #f)) (check? file-system-check? ; Boolean (default #t)) (create-mount-point? file-system-create-mount-point? ; Boolean (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 ;; Control file system for Linux' file systems in user-space (FUSE). (file-system |