[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/04: system: Add helper file-system-mount-point-predicate.
From: |
guix-commits |
Subject: |
02/04: system: Add helper file-system-mount-point-predicate. |
Date: |
Tue, 15 Feb 2022 04:31:46 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 0055a803e204b8df98469413c6fbc8a8f730842c
Author: Josselin Poiret <dev@jpoiret.xyz>
AuthorDate: Sun Feb 6 22:20:44 2022 +0100
system: Add helper file-system-mount-point-predicate.
* gnu/system/file-systems.scm (file-system-mount-point-predicate): Add
it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
---
gnu/system/file-systems.scm | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index e1d1fb72cc..437f8da898 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -60,6 +60,7 @@
file-system-location
file-system-type-predicate
+ file-system-mount-point-predicate
btrfs-subvolume?
btrfs-store-subvolume-file-name
@@ -671,6 +672,12 @@ system has the given TYPE."
(lambda (fs)
(string=? (file-system-type fs) type)))
+(define (file-system-mount-point-predicate mount-point)
+ "Return a predicate that, when passed a file system, returns #t if that file
+system has the given MOUNT-POINT."
+ (lambda (fs)
+ (string=? (file-system-mount-point fs) mount-point)))
+
;;;
;;; Btrfs specific helpers.