diff options
| author | Josselin Poiret <dev@jpoiret.xyz> | 2022-02-06 22:20:44 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-02-15 10:14:14 +0100 |
| commit | 0055a803e204b8df98469413c6fbc8a8f730842c (patch) | |
| tree | a903ee7d892ff6931adfdf84737118babf56cc9a /gnu/system | |
| parent | 7f6dd3be3dceb0fda15fd02c9165614b2626813e (diff) | |
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>
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/file-systems.scm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index e1d1fb72cca..437f8da8983 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm | |||
| @@ -60,6 +60,7 @@ | |||
| 60 | file-system-location | 60 | file-system-location |
| 61 | 61 | ||
| 62 | file-system-type-predicate | 62 | file-system-type-predicate |
| 63 | file-system-mount-point-predicate | ||
| 63 | btrfs-subvolume? | 64 | btrfs-subvolume? |
| 64 | btrfs-store-subvolume-file-name | 65 | btrfs-store-subvolume-file-name |
| 65 | 66 | ||
| @@ -671,6 +672,12 @@ system has the given TYPE." | |||
| 671 | (lambda (fs) | 672 | (lambda (fs) |
| 672 | (string=? (file-system-type fs) type))) | 673 | (string=? (file-system-type fs) type))) |
| 673 | 674 | ||
| 675 | (define (file-system-mount-point-predicate mount-point) | ||
| 676 | "Return a predicate that, when passed a file system, returns #t if that file | ||
| 677 | system has the given MOUNT-POINT." | ||
| 678 | (lambda (fs) | ||
| 679 | (string=? (file-system-mount-point fs) mount-point))) | ||
| 680 | |||
| 674 | 681 | ||
| 675 | ;;; | 682 | ;;; |
| 676 | ;;; Btrfs specific helpers. | 683 | ;;; Btrfs specific helpers. |
