summaryrefslogtreecommitdiff
path: root/props.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2017-10-14 21:54:54 +0900
committerDavid Sterba <dsterba@suse.com>2017-11-14 15:59:00 +0100
commitc0f7e291274df28e83554fe2c38cb5e5cebddd7c (patch)
tree7b1465ddb6bf69ccede27f7b3a88daf2d767649b /props.c
parentdf11e2787b5b57ecdb313f2725dc5c9a5e549576 (diff)
btrfs-progs: prop: also allow "none" to disable compression
Some people were asking why disabling compression via properties is not set by "none" instead. As this is purely userspace conversion to "" that kernel accepts, let's add "none" as well for convenience. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'props.c')
-rw-r--r--props.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/props.c b/props.c
index 94b43b40..cddbd927 100644
--- a/props.c
+++ b/props.c
@@ -143,7 +143,7 @@ static int prop_compression(enum prop_object_type type,
xattr_name[XATTR_BTRFS_PREFIX_LEN + strlen(name)] = '\0';
if (value) {
- if (strcmp(value, "no") == 0)
+ if (strcmp(value, "no") == 0 || strcmp(value, "none") == 0)
value = "";
sret = fsetxattr(fd, xattr_name, value, strlen(value), 0);
} else {