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>
This commit is contained in:
Josselin Poiret 2022-02-06 22:20:44 +01:00 committed by Ludovic Courtès
parent 7f6dd3be3d
commit 0055a803e2
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -60,6 +60,7 @@ (define-module (gnu system file-systems)
file-system-location
file-system-type-predicate
file-system-mount-point-predicate
btrfs-subvolume?
btrfs-store-subvolume-file-name
@ -671,6 +672,12 @@ (define (file-system-type-predicate 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.