diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-02-26 17:39:55 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-03-02 05:11:37 +0100 |
commit | 674b04ff1b6deab17f5d36c036c0275ba94e1ebc (patch) | |
tree | ded872db0bffeccb8fe5171019d9d265164874cc /src/shared/discover-image.c | |
parent | test-signal-util: add test for signal_is_blocked() (diff) | |
download | systemd-674b04ff1b6deab17f5d36c036c0275ba94e1ebc.tar.xz systemd-674b04ff1b6deab17f5d36c036c0275ba94e1ebc.zip |
btrfs-util: add helper that abstracts "might be btrfs subvol?" check
Let#s not hardcode inode nr 256 everywhere, but abstract this check
slightly.
Diffstat (limited to 'src/shared/discover-image.c')
-rw-r--r-- | src/shared/discover-image.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/shared/discover-image.c b/src/shared/discover-image.c index fb59d1d704..79c4c70a41 100644 --- a/src/shared/discover-image.c +++ b/src/shared/discover-image.c @@ -260,8 +260,7 @@ static int image_make( if (fd < 0) return -errno; - /* btrfs subvolumes have inode 256 */ - if (st->st_ino == 256) { + if (btrfs_might_be_subvol(st)) { r = btrfs_is_filesystem(fd); if (r < 0) |