From 86c926d7f2dd4906d51dbcd7d39474116768a68d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 3 Aug 2020 17:44:38 +0200 Subject: 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. --- gnu/system/file-systems.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/system/file-systems.scm') 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 @@ (define (file-system->spec fs) (match fs (($ 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 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)) -- cgit v1.2.3