diff mbox series

[bug#65335,1/4] file-systems: canonicalize-device-name: Ignore the "none" case.

Message ID 344951a96d504fb86db43c79262739f5a7c086bb.1692178169.git.ngraves@ngraves.fr
State New
Headers show
Series Allow mounting root on tmpfs for impersistence | expand

Commit Message

Nicolas Graves Aug. 16, 2023, 9:29 a.m. UTC
---
 gnu/build/file-systems.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)


base-commit: 1a92b3f43c280f143b00f8bb95a173fb85e52664
diff mbox series

Patch

diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm
index 36a59f5f5c..e39bd31c3b 100644
--- a/gnu/build/file-systems.scm
+++ b/gnu/build/file-systems.scm
@@ -1021,8 +1021,8 @@  (define find-partition-by-luks-uuid
 
 (define (canonicalize-device-spec spec)
   "Return the device name corresponding to SPEC, which can be a <uuid>, a
-<file-system-label>, or a string (typically a /dev file name or an nfs-root
-containing ':/')."
+<file-system-label>, the string 'none' or another string (typically a /dev
+file name or an nfs-root containing ':/')."
   (define max-trials
     ;; Number of times we retry partition label resolution, 1 second per
     ;; trial.  Note: somebody reported a delay of 16 seconds (!) before their
@@ -1046,8 +1046,8 @@  (define (canonicalize-device-spec spec)
 
   (match spec
     ((? string?)
-     (if (string-contains spec ":/")
-         spec                  ; do not resolve NFS devices
+     (if (or (string-contains spec ":/") (string=? spec "none"))
+         spec                  ; do not resolve NFS / tmpfs devices
          ;; Nothing to do, but wait until SPEC shows up.
          (resolve identity spec identity)))
     ((? file-system-label?)