search for: parse_compress_type

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

2010 Nov 16
2
[Btrfs-Progs] Update for lzo support
....]\n" "Defragment a file or a directory." }, { do_set_default_subvol, 2, diff --git a/btrfs_cmds.c b/btrfs_cmds.c index 8031c58..14f0ffd 100644 --- a/btrfs_cmds.c +++ b/btrfs_cmds.c @@ -142,10 +142,21 @@ static u64 parse_size(char *s) return atoll(s) * mult; } +static int parse_compress_type(char *s) +{ + if (strcmp(optarg, "zlib") == 0) + return BTRFS_COMPRESS_ZLIB; + else if (strcmp(optarg, "lzo") == 0) + return BTRFS_COMPRESS_LZO; + else { + fprintf(stderr, "Unknown compress type %s\n", s); + exit(1); + }; +} + int do_defrag(int ac, char **av) {...
2011 Jul 19
6
[PATCH 0/6] Move the infor for the help/man page in the source
The following series implement a way to generate the help messages and the btrfs man page from the sources comments for the "btrfs" commanda . The syntax and the detailed help of every subcommand are stored in the comments before the function which implements the subcommand. The fact that the help messages and the man page are generated from the same source should help to avoid