guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: system: 'operating-system-root-file-system' raises upon missing r


From: guix-commits
Subject: 05/05: system: 'operating-system-root-file-system' raises upon missing root.
Date: Tue, 14 Jul 2020 19:54:11 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d7e9e0bbc9aadec3e1830767a8771bfbe9c43155
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Jul 15 01:32:25 2020 +0200

    system: 'operating-system-root-file-system' raises upon missing root.
    
    * gnu/system.scm (operating-system-root-file-system): Raise when 'find'
    returns #f.
---
 gnu/system.scm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gnu/system.scm b/gnu/system.scm
index e7f85e4..de5f25a 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1032,9 +1032,13 @@ we're running in the final root."
 
 (define (operating-system-root-file-system os)
   "Return the root file system of OS."
-  (find (lambda (fs)
-          (string=? "/" (file-system-mount-point fs)))
-        (operating-system-file-systems os)))
+  (or (find (lambda (fs)
+              (string=? "/" (file-system-mount-point fs)))
+            (operating-system-file-systems os))
+      (raise (condition
+              (&message (message "missing root file system"))
+              (&error-location
+               (location (operating-system-location os)))))))
 
 (define (operating-system-initrd-file os)
   "Return a gexp denoting the initrd file of OS."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]