mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-11 21:59:08 -05:00
file-systems: Recognize “none” as a valid device spec.
* gnu/build/file-systems (canonicalize-device-name): Fallback to tmpfs if spec is "none". Change-Id: Ia55c715d04c7611ba8c979f23f1ad4a8ed2e75b6 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
7d6550eec7
commit
a5f66c2446
1 changed files with 5 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
|||
;;; Copyright © 2019 David C. Trudgian <dave@trudgian.net>
|
||||
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||
;;; Copyright © 2022 Oleg Pykhalov <go.wigust@gmail.com>
|
||||
;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -1021,8 +1022,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 +1047,8 @@ (define (resolve find-partition spec fmt)
|
|||
|
||||
(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?)
|
||||
|
|
Loading…
Reference in a new issue