]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxcmd/command.c
libxcmd: check CMD_FLAG_GLOBAL inside args_command()
authorDave Chinner <dchinner@redhat.com>
Thu, 12 Jan 2017 20:12:41 +0000 (14:12 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 12 Jan 2017 20:12:41 +0000 (14:12 -0600)
commit7a9b7314796f7f9b313d4ec96bd9af40207c9549
tree55d84159ba6c564d729e59bdee012c908c9b2fca
parentc327e1f9b00ea6107bdb1da9b2cbd452fb7247ee
libxcmd: check CMD_FLAG_GLOBAL inside args_command()

Rather than having multiple methods of executing commands from the
CLI, use CMD_FLAG_GLOBAL to indicate a one-shot command rather than
an iterative command from args_command(). This simplifies the main
loop processing.

To make it more obvious what this CMD_FLAG_GLOBAL flag does, rename
it to CMD_FLAG_ONESHOT to indicate that the command should only ever
be executed once and not iterated.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/command.h
io/file.c
io/init.c
libxcmd/command.c
libxcmd/help.c
libxcmd/quit.c
quota/path.c
quota/report.c