Btrfs-progs: implement new subcommand parser
authorIlya Dryomov <idryomov@gmail.com>
Fri, 3 Feb 2012 19:00:17 +0000 (21:00 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 3 Feb 2012 19:00:17 +0000 (21:00 +0200)
commit8b4e3d8b5b9e3cb65b244fec55d93608d1a1e319
tree3615c42febac6822dc7cb49ebd900abb1addbb05
parent4f268331932819fb5e002e4a88449de6f76bb0b2
Btrfs-progs: implement new subcommand parser

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>
Makefile
btrfs.c
commands.h [new file with mode: 0644]
help.c [new file with mode: 0644]