search for: parse_one_fs_feature

Displaying 2 results from an estimated 2 matches for "parse_one_fs_feature".

2013 Nov 14
3
[PATCH] btrfs-progs: mkfs: extend -O syntax to disable features
...g. due to lack of support in the used kernel. Signed-off-by: David Sterba <dsterba@suse.cz> --- mkfs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mkfs.c b/mkfs.c index cd0af9ef8b4f..f825e1b6bc2d 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1168,7 +1168,11 @@ static int parse_one_fs_feature(const char *name, u64 *flags) int found = 0; for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) { - if (!strcmp(mkfs_features[i].name, name)) { + if (name[0] == ''^'' && + !strcmp(mkfs_features[i].name, name + 1)) { + *flags &= ~ mkfs_features[i].flag; + fo...
2013 May 16
0
[PATCH] btrfs-progs: mkfs: add -O option to specify fs features
...; + + fprintf(stderr, "Filesystem features available at mkfs time:\n"); + for (i = 0; i < ARRAY_SIZE(mkfs_features) - 1; i++) { + fprintf(stderr, "%-20s- %s (0x%llx)\n", + mkfs_features[i].name, + mkfs_features[i].desc, + mkfs_features[i].flag); + } +} + +static int parse_one_fs_feature(const char *name, u64 *flags) +{ + int i; + int found = 0; + + for (i = 0; i < ARRAY_SIZE(mkfs_features); i++) { + if (!strcmp(mkfs_features[i].name, name)) { + *flags |= mkfs_features[i].flag; + found = 1; + } + } + + return !found; +} + +static void process_fs_features(u64 flags) +{ + in...