diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-01-20 22:12:10 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-01-20 22:12:10 +0100 |
commit | 3e2d4e69c340c3520f546f8c7e21e52383058d1c (patch) | |
tree | 0bc92edb753cfdf9a9e7ef763ebc19f0cd2d528c /gnu/build/file-systems.scm | |
parent | ad79ae7e2d7505292b11e87302b08f4db0f934e9 (diff) | |
parent | e5ad2cdf172eecc7edef37a500593b1941af013c (diff) | |
download | guix-3e2d4e69c340c3520f546f8c7e21e52383058d1c.tar.gz guix-3e2d4e69c340c3520f546f8c7e21e52383058d1c.zip |
Merge branch 'master' into staging
Diffstat (limited to 'gnu/build/file-systems.scm')
-rw-r--r-- | gnu/build/file-systems.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gnu/build/file-systems.scm b/gnu/build/file-systems.scm index e3369d8521..c468144170 100644 --- a/gnu/build/file-systems.scm +++ b/gnu/build/file-systems.scm @@ -42,6 +42,10 @@ find-partition-by-luks-uuid canonicalize-device-spec + read-partition-label + read-partition-uuid + read-luks-partition-uuid + bind-mount mount-flags->bit-mask @@ -435,6 +439,12 @@ partition field reader that returned a value." (define read-partition-uuid (cut read-partition-field <> %partition-uuid-readers)) +(define luks-partition-field-reader + (partition-field-reader read-luks-header luks-header-uuid)) + +(define read-luks-partition-uuid + (cut read-partition-field <> (list luks-partition-field-reader))) + (define (partition-predicate reader =) "Return a predicate that returns true if the FIELD of partition header that was READ is = to the given value." @@ -451,9 +461,7 @@ was READ is = to the given value." (partition-predicate read-partition-uuid uuid=?)) (define luks-partition-uuid-predicate - (partition-predicate - (partition-field-reader read-luks-header luks-header-uuid) - uuid=?)) + (partition-predicate luks-partition-field-reader uuid=?)) (define (find-partition predicate) "Return the first partition found that matches PREDICATE, or #f if none |