diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-08-03 17:44:38 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-08-03 17:44:38 +0200 |
commit | 86c926d7f2dd4906d51dbcd7d39474116768a68d (patch) | |
tree | e7815765d74615e5f881d37aaa97d5c83150ee25 /gnu/system/file-systems.scm | |
parent | 898e6d0a07e4260600d0876d8d1f551ac8b647f9 (diff) | |
download | guix-86c926d7f2dd4906d51dbcd7d39474116768a68d.tar guix-86c926d7f2dd4906d51dbcd7d39474116768a68d.tar.gz |
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.
Diffstat (limited to 'gnu/system/file-systems.scm')
-rw-r--r-- | gnu/system/file-systems.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index a62cf902bf..5c02dfac93 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -307,6 +307,7 @@ initrd code." (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 @@ initrd code." (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)) |