summaryrefslogtreecommitdiff
path: root/src/shared/machine-image.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/machine-image.c')
-rw-r--r--src/shared/machine-image.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
index 0b41860b5d..bc215f0ad5 100644
--- a/src/shared/machine-image.c
+++ b/src/shared/machine-image.c
@@ -136,12 +136,11 @@ static int image_make(
/* btrfs subvolumes have inode 256 */
if (st.st_ino == 256) {
- struct statfs sfs;
- if (fstatfs(fd, &sfs) < 0)
- return -errno;
-
- if (F_TYPE_EQUAL(sfs.f_type, BTRFS_SUPER_MAGIC)) {
+ r = btrfs_is_filesystem(fd);
+ if (r < 0)
+ return r;
+ if (r) {
BtrfsSubvolInfo info;
BtrfsQuotaInfo quota;