From c6d00c3f00c9652b8e4915beef1d91e6045adec8 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Tue, 23 Jul 2019 17:02:22 +0200 Subject: [PATCH] btrfs-progs: props: convert to C99 initializers Signed-off-by: David Sterba --- props.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/props.c b/props.c index 22268afa..00402260 100644 --- a/props.c +++ b/props.c @@ -167,11 +167,25 @@ out: } const struct prop_handler prop_handlers[] = { - {"ro", "read-only status of a subvolume", 0, prop_object_subvol, - prop_read_only}, - {"label", "label of the filesystem", 0, - prop_object_dev | prop_object_root, prop_label}, - {"compression", "compression algorighm for the file or directory", 0, - prop_object_inode, prop_compression}, + { + .name ="ro", + .desc = "read-only status of a subvolume", + .read_only = 0, + .types = prop_object_subvol, + .handler = prop_read_only + }, + { + .name = "label", + .desc = "label of the filesystem", + .read_only = 0, + .types = prop_object_dev | prop_object_root, + .handler = prop_label + }, + { + .name = "compression", + .desc = "compression algorighm for the file or directory", + .read_only = 0, + .types = prop_object_inode, prop_compression + }, {NULL, NULL, 0, 0, NULL} };