mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-19 05:57:04 +01:00
file-systems: Leave room for extension in serialized specs.
* gnu/system/file-systems.scm (spec->file-system): Ignore extra fields. (file-system->spec): Add comment.
This commit is contained in:
parent
898e6d0a07
commit
86c926d7f2
1 changed files with 3 additions and 1 deletions
|
@ -307,6 +307,7 @@ (define (file-system->spec fs)
|
|||
(match fs
|
||||
(($ <file-system> device mount-point type flags options mount?
|
||||
mount-may-fail? needed-for-boot? check?)
|
||||
;; Note: Add new fields towards the end for compatibility.
|
||||
(list (cond ((uuid? device)
|
||||
`(uuid ,(uuid-type device) ,(uuid-bytevector device)))
|
||||
((file-system-label? device)
|
||||
|
@ -317,7 +318,8 @@ (define (file-system->spec fs)
|
|||
(define (spec->file-system sexp)
|
||||
"Deserialize SEXP, a list, to the corresponding <file-system> object."
|
||||
(match sexp
|
||||
((device mount-point type flags options mount-may-fail? check?)
|
||||
((device mount-point type flags options mount-may-fail? check?
|
||||
_ ...) ;placeholder for new fields
|
||||
(file-system
|
||||
(device (match device
|
||||
(('uuid (? symbol? type) (? bytevector? bv))
|
||||
|
|
Loading…
Reference in a new issue