X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fmachine-image.c;h=bc215f0ad5ca60e60d8fa600c6879717c354d65c;hb=d13c4b0f724ceae4237d4bdd2d912ed5c92ba93f;hp=0b41860b5d820b5f0240c5087763da7b56fcf09b;hpb=ef0698793cd19e82ce8e94e89f1c6461ec2f1dce;p=elogind.git diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c index 0b41860b5..bc215f0ad 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;