summary refs log tree commit diff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-11-25 16:01:21 +0100
committerLudovic Courtès <ludo@gnu.org>2014-11-25 18:01:59 +0100
commit4d6b879cb5313c30910330763dca1f1642623c4d (patch)
tree43f3f88b83cd885377ad2242f2486f3eb1c676d7 /gnu/system.scm
parent6eef465eeaf762d99301a94a8a95670356c39778 (diff)
downloadguix-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.scm')
-rw-r--r--gnu/system.scm11
1 files changed, 2 insertions, 9 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index f98aa83f62..5c915d3969 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -204,9 +204,7 @@ file."
   "Return file system services for the file systems of OS that are not marked
 as 'needed-for-boot'."
   (define file-systems
-    (remove (lambda (fs)
-              (or (file-system-needed-for-boot? fs)
-                  (string=? "/" (file-system-mount-point fs))))
+    (remove file-system-needed-for-boot?
             (operating-system-file-systems os)))
 
   (define (device-mappings fs)
@@ -638,12 +636,7 @@ we're running in the final root."
 (define (operating-system-initrd-file os)
   "Return a gexp denoting the initrd file of OS."
   (define boot-file-systems
-    (filter (match-lambda
-             (($ <file-system> device title "/")
-              #t)
-             (($ <file-system> device title mount-point type flags
-                               options boot?)
-              boot?))
+    (filter file-system-needed-for-boot?
             (operating-system-file-systems os)))
 
   (define mapped-devices