aboutsummaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-10-06 11:03:27 +0200
committerMarius Bakke <mbakke@fastmail.com>2017-10-06 11:03:27 +0200
commit6a317919cf0f9dbc651a4a41f9ed99c49bf2d543 (patch)
tree9454b6c587b75ee1e3625be64f39cc39a5154db6 /gnu/system
parent68932812b8f6581dda4bf1896235492f687b7cc9 (diff)
parent8bde6a524e19d2bc9763b84dbf99959faf653bf8 (diff)
downloadpatches-6a317919cf0f9dbc651a4a41f9ed99c49bf2d543.tar
patches-6a317919cf0f9dbc651a4a41f9ed99c49bf2d543.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/file-systems.scm6
-rw-r--r--gnu/system/uuid.scm13
2 files changed, 18 insertions, 1 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 52f16676f5..92f040425d 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -38,6 +38,7 @@
file-system-check?
file-system-create-mount-point?
file-system-dependencies
+ file-system-location
file-system-type-predicate
@@ -101,7 +102,10 @@
(create-mount-point? file-system-create-mount-point? ; Boolean
(default #f))
(dependencies file-system-dependencies ; list of <file-system>
- (default '()))) ; or <mapped-device>
+ (default '())) ; or <mapped-device>
+ (location file-system-location
+ (default (current-source-location))
+ (innate)))
;; Note: This module is used both on the build side and on the host side.
;; Arrange not to pull (guix store) and (guix config) because the latter
diff --git a/gnu/system/uuid.scm b/gnu/system/uuid.scm
index 6470abb8cc..e422e06a6d 100644
--- a/gnu/system/uuid.scm
+++ b/gnu/system/uuid.scm
@@ -29,6 +29,7 @@
uuid?
uuid-type
uuid-bytevector
+ uuid=?
bytevector->uuid
@@ -281,3 +282,15 @@ corresponding bytevector; otherwise return #f."
((_ . (? procedure? unparse)) (unparse bv))))
(((? uuid? uuid))
(uuid->string (uuid-bytevector uuid) (uuid-type uuid)))))
+
+(define uuid=?
+ ;; Return true if A is equal to B, comparing only the actual bits.
+ (match-lambda*
+ (((? bytevector? a) (? bytevector? b))
+ (bytevector=? a b))
+ (((? uuid? a) (? bytevector? b))
+ (bytevector=? (uuid-bytevector a) b))
+ (((? uuid? a) (? uuid? b))
+ (bytevector=? (uuid-bytevector a) (uuid-bytevector b)))
+ ((a b)
+ (uuid=? b a))))