summaryrefslogtreecommitdiff
path: root/help.c
Commit message (Collapse)AuthorAge
* btrfs-progs: move prefixcmp to utilsDavid Sterba2016-01-14
| | | | Signed-off-by: David Sterba <dsterba@suse.com>
* btrfs-progs: no extra newline between aliased commands in help textDavid Sterba2015-06-26
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: alias btrfs device delete to btrfs device removeOmar Sandoval2015-06-26
| | | | | | | | There's an awkward asymmetry between btrfs device add and btrfs device delete. Resolve this by aliasing delete to remove. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: replace struct cmd_group->hidden with flagsOmar Sandoval2015-06-26
| | | | | | | | We're also going to want to support aliases, so rather than adding another member, replace "hidden" with a "flags" member. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: print compact help for btrfsDavid Sterba2015-06-09
| | | | | | | | Running 'btrfs' without arguments will print complete help that spans a lot of lines and is really helpful. Print only subcommand group names with short descriptions, similar to what 'git' does. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: fix argv0_buf handlingDavid Sterba2015-06-09
| | | | | | | | | | | | | | | | The variable argv0_buf was duplicated and the changes done in utils.c were not propagated to help.c. So if an unknown commandline token was found, the error message did not contain the known part: $ btrfs scrub test : unknown token 'test' instead of $ btrfs scrub test btrfs scrub: uknown token 'test' Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: include headers required for musl-libcMerlijn Wajer2014-12-18
| | | | | | | | This fixes various compilation errors where PATH_MAX and XATTR_SIZE_MAX were missing. To my knowledge, this should have no bad side effects. Signed-off-by: Merlijn Wajer <merlijn@wizzup.org> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move the check_argc_* functions into utils.cGui Hecheng2014-08-22
| | | | | | | | | | | | | | To let the independent tools(e.g. btrfs-image, btrfs-convert, etc.) share the convenience of check_argc_* functions, just move it into utils.c. Also add a new function "set_argv0" to set the correct tool name: *btrfs-image*: too few arguments The original btrfs* tools work as before. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> [moved argv0 and check_argc to utils.*] Signed-off-by: David Sterba <dsterba@suse.cz>
* Btrfs-progs: return 1 rather than 129 in usage()Wang Shilong2013-10-16
| | | | | | | | if usage or syntax error happens, we return 1. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* btrfs-progs: make many private symbols staticZach Brown2013-09-03
| | | | | | Signed-off-by: Zach Brown <zab@redhat.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
* Btrfs-progs: allow multi-line command group synopsisIlya Dryomov2012-02-08
| | | | Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* Btrfs-progs: implement new subcommand parserIlya Dryomov2012-02-03
This completely replaces the existing subcommand infrastructure, which is not flexible enough to accomodate our needs. Instead of a global command table we now have per-level tables and command group handlers, which allows command-group-specific handling of options and subcommands. The new parser exports a clear interface and gets out of the way - all control over how matching is done is passed to commands and command group handlers. One side effect of this is that command implementors have to check the number of arguments themselves - patch to fix up all existing commands follows. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>