From 21222ea5cdec65fa30a75bd5a78475459075b946 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 22 Apr 2015 13:08:19 +0200 Subject: btrfs-util: introduce btrfs_is_filesystem() and make use of it where appropriate Let's unify the code that checks whether an fd is on btrfs a bit. (Also, rename btrfs_is_snapshot() to btrfs_is_subvol(), since that's usually how this is referred to in our code) --- src/shared/btrfs-util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared/btrfs-util.h') diff --git a/src/shared/btrfs-util.h b/src/shared/btrfs-util.h index 02e46e30ea..a7eb895c93 100644 --- a/src/shared/btrfs-util.h +++ b/src/shared/btrfs-util.h @@ -49,7 +49,8 @@ typedef enum BtrfsSnapshotFlags { BTRFS_SNAPSHOT_RECURSIVE = 4, } BtrfsSnapshotFlags; -int btrfs_is_snapshot(int fd); +int btrfs_is_filesystem(int fd); +int btrfs_is_subvol(int fd); int btrfs_subvol_make(const char *path); int btrfs_subvol_make_label(const char *path); -- cgit v1.2.3-54-g00ecf