summaryrefslogtreecommitdiff
path: root/print-tree.c
diff options
context:
space:
mode:
authorNick Terrell <terrelln@fb.com>2017-09-08 13:29:23 -0700
committerDavid Sterba <dsterba@suse.com>2017-09-25 15:17:13 +0200
commit717a8b1e5d1ba69154ef84b35be75c9cf7730e1d (patch)
tree0f8d0e15f92171dc4cd7ed23ec789f50b83d486c /print-tree.c
parent86529862e1ff1b1b27aafc207b75b0c851fbfd34 (diff)
btrfs-progs: Add zstd support
Adds zstd support to the btrfs program. An optional dependency on libzstd >= 1.0.0 is added. Autoconf accepts `--enable-zstd' or `--disable-zstd' and defaults to detecting if libzstd is present using `pkg-config'. The patch is also available in my fork of btrfs-progs [1], which passes Travis-CI with the new tests. The prebuilt binary is available there. I haven't updated Android.mk. [1] https://github.com/terrelln/btrfs-progs/tree/devel Signed-off-by: Nick Terrell <terrelln@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'print-tree.c')
-rw-r--r--print-tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/print-tree.c b/print-tree.c
index 6e6b69b8..cbed541a 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -323,6 +323,9 @@ static void compress_type_to_str(u8 compress_type, char *ret)
case BTRFS_COMPRESS_LZO:
strcpy(ret, "lzo");
break;
+ case BTRFS_COMPRESS_ZSTD:
+ strcpy(ret, "zstd");
+ break;
default:
sprintf(ret, "UNKNOWN.%d", compress_type);
}