From f8711016ebe420069cca79ae6564c5425bb9369c Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 7 Dec 2023 14:29:54 +0100 Subject: [PATCH] btrfs-progs: receive: properly report lack of zstd support If zstd is not compiled in then a stream fails with a generic error message: ERROR: unknown compression: 2 Where BTRFS_ENCODED_IO_COMPRESSION_ZSTD is 2 and there's a case for that but behind the '#if COMPRESSION_ZSTD'. Signed-off-by: David Sterba --- cmds/receive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmds/receive.c b/cmds/receive.c index a50e2182..e4430b07 100644 --- a/cmds/receive.c +++ b/cmds/receive.c @@ -1184,8 +1184,8 @@ static int decompress_and_write(struct btrfs_receive *rctx, if (ret) goto out; break; -#if COMPRESSION_ZSTD case BTRFS_ENCODED_IO_COMPRESSION_ZSTD: +#if COMPRESSION_ZSTD ret = decompress_zstd(rctx, encoded_data, encoded_len, unencoded_data, unencoded_len); if (ret)