mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
system: Allow the root file system to have a UUID.
This is a followup to ab64483
.
* gnu/system.scm (mapped-device-user): Check whether the title of FS is
'device before calling 'string=?'.
* gnu/system/vm.scm (virtualized-operating-system)[user-file-systems]:
Likewise.
This commit is contained in:
parent
daa8922abc
commit
29824d80ec
2 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
|
||||||
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
|
;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
|
@ -193,7 +193,7 @@ (define file-systems
|
||||||
|
|
||||||
(define (device-mappings fs)
|
(define (device-mappings fs)
|
||||||
(let ((device (file-system-device fs)))
|
(let ((device (file-system-device fs)))
|
||||||
(if (string? device)
|
(if (string? device) ;title is 'device
|
||||||
(filter (lambda (md)
|
(filter (lambda (md)
|
||||||
(string=? (string-append "/dev/mapper/"
|
(string=? (string-append "/dev/mapper/"
|
||||||
(mapped-device-target md))
|
(mapped-device-target md))
|
||||||
|
@ -216,7 +216,8 @@ (define (mapped-device-user device file-systems)
|
||||||
"Return a file system among FILE-SYSTEMS that uses DEVICE, or #f."
|
"Return a file system among FILE-SYSTEMS that uses DEVICE, or #f."
|
||||||
(let ((target (string-append "/dev/mapper/" (mapped-device-target device))))
|
(let ((target (string-append "/dev/mapper/" (mapped-device-target device))))
|
||||||
(find (lambda (fs)
|
(find (lambda (fs)
|
||||||
(string=? (file-system-device fs) target))
|
(and (eq? 'device (file-system-title fs))
|
||||||
|
(string=? (file-system-device fs) target)))
|
||||||
file-systems)))
|
file-systems)))
|
||||||
|
|
||||||
(define (operating-system-user-mapped-devices os)
|
(define (operating-system-user-mapped-devices os)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
|
;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -391,7 +391,8 @@ (define user-file-systems
|
||||||
(source (file-system-device fs)))
|
(source (file-system-device fs)))
|
||||||
(or (string=? target (%store-prefix))
|
(or (string=? target (%store-prefix))
|
||||||
(string=? target "/")
|
(string=? target "/")
|
||||||
(string-prefix? "/dev/" source))))
|
(and (eq? 'device (file-system-title fs))
|
||||||
|
(string-prefix? "/dev/" source)))))
|
||||||
(operating-system-file-systems os)))
|
(operating-system-file-systems os)))
|
||||||
|
|
||||||
(operating-system (inherit os)
|
(operating-system (inherit os)
|
||||||
|
|
Loading…
Reference in a new issue