All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 13/20] btrfs-progs: use cmd_struct as command entry point
Date: Sun, 11 Mar 2018 23:11:06 -0400	[thread overview]
Message-ID: <85840b4b-e8c4-d54d-bcf6-b52eaf7e3d5a@suse.com> (raw)
In-Reply-To: <20180308024047.10104-14-jeffm@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 2103 bytes --]

On 3/7/18 9:40 PM, jeffm@suse.com wrote:
> From: Jeff Mahoney <jeffm@suse.com>
> diff --git a/cmds-inspect.c b/cmds-inspect.c
> index afd7fe48..12f200b3 100644
> --- a/cmds-inspect.c
> +++ b/cmds-inspect.c
> @@ -625,33 +629,27 @@ static int cmd_inspect_min_dev_size(int argc, char **argv)
>  out:
>  	return !!ret;
>  }
> +static DEFINE_SIMPLE_COMMAND(inspect_min_dev_size, "min-dev-size");
>  
>  static const char inspect_cmd_group_info[] =
>  "query various internal information";
>  
> -const struct cmd_group inspect_cmd_group = {
> +static const struct cmd_group inspect_cmd_group = {
>  	inspect_cmd_group_usage, inspect_cmd_group_info, {
> -		{ "inode-resolve", cmd_inspect_inode_resolve,
> -			cmd_inspect_inode_resolve_usage, NULL, 0 },
> -		{ "logical-resolve", cmd_inspect_logical_resolve,
> -			cmd_inspect_logical_resolve_usage, NULL, 0 },
> -		{ "subvolid-resolve", cmd_inspect_subvolid_resolve,
> -			cmd_inspect_subvolid_resolve_usage, NULL, 0 },
> -		{ "rootid", cmd_inspect_rootid, cmd_inspect_rootid_usage, NULL,
> -			0 },
> -		{ "min-dev-size", cmd_inspect_min_dev_size,
> -			cmd_inspect_min_dev_size_usage, NULL, 0 },
> -		{ "dump-tree", cmd_inspect_dump_tree,
> -				cmd_inspect_dump_tree_usage, NULL, 0 },
> -		{ "dump-super", cmd_inspect_dump_super,
> -				cmd_inspect_dump_super_usage, NULL, 0 },
> -		{ "tree-stats", cmd_inspect_tree_stats,
> -				cmd_inspect_tree_stats_usage, NULL, 0 },
> -		NULL_CMD_STRUCT
> +		&cmd_struct_inspect_inode_resolve,
> +		&cmd_struct_inspect_logical_resolve,
> +		&cmd_struct_inspect_subvolid_resolve,
> +		&cmd_struct_inspect_rootid,
> +		&cmd_struct_inspect_min_dev_size,
> +		&cmd_struct_inspect_dump_tree,
> +		&cmd_struct_inspect_dump_super,
> +		&cmd_struct_inspect_tree_stats,
> +		NULL
>  	}
>  };
>  
> -int cmd_inspect(int argc, char **argv)
> +static int cmd_inspect(int argc, char **argv)
>  {
>  	return handle_command_group(&inspect_cmd_group, argc, argv);
>  }
> +DEFINE_GROUP_COMMAND(inspect, "inspect");

"inspect-internal"

-Jeff


-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-03-12  3:11 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-08  2:40 [PATCH v2 00/20] btrfs-progs: qgroups usability jeffm
2018-03-08  2:40 ` [PATCH 01/20] btrfs-progs: quota: Add -W option to rescan to wait without starting rescan jeffm
2018-05-03  5:17   ` Qu Wenruo
2018-03-08  2:40 ` [PATCH 02/20] btrfs-progs: qgroups: fix misleading index check jeffm
2018-03-08  2:40 ` [PATCH 03/20] btrfs-progs: constify pathnames passed as arguments jeffm
2018-03-08  2:40 ` [PATCH 04/20] btrfs-progs: btrfs-list: add rb_entry helpers for root_info jeffm
2018-03-08  2:40 ` [PATCH 05/20] btrfs-progs: btrfs-list: add btrfs_cleanup_root_info jeffm
2018-03-08  2:40 ` [PATCH 06/20] btrfs-progs: qgroups: add pathname to show output jeffm
2018-03-08  5:33   ` Qu Wenruo
2018-03-08 14:25     ` Jeff Mahoney
2018-03-08  2:40 ` [PATCH 07/20] btrfs-progs: qgroups: introduce and use info and limit structures jeffm
2018-03-08  5:34   ` Qu Wenruo
2018-03-08  2:40 ` [PATCH 08/20] btrfs-progs: qgroups: introduce btrfs_qgroup_query jeffm
2018-03-08  5:54   ` Qu Wenruo
2018-03-08 15:21     ` Jeff Mahoney
2018-03-09  0:27       ` Qu Wenruo
2018-03-08  2:40 ` [PATCH 09/20] btrfs-progs: subvolume: add quota info to btrfs sub show jeffm
2018-03-08  2:40 ` [PATCH 10/20] btrfs-progs: help: convert ints used as bools to bool jeffm
2018-03-08  5:55   ` Qu Wenruo
2018-03-08  2:40 ` [PATCH 11/20] btrfs-progs: reorder placement of help declarations for send/receive jeffm
2018-03-08  2:40 ` [PATCH 12/20] btrfs-progs: filesystem balance: split out special handling jeffm
2018-03-08  2:40 ` [PATCH 13/20] btrfs-progs: use cmd_struct as command entry point jeffm
2018-03-12  3:11   ` Jeff Mahoney [this message]
2018-03-12  3:24   ` Jeff Mahoney
2018-03-08  2:40 ` [PATCH 14/20] btrfs-progs: pass cmd_struct to command callback function jeffm
2018-03-08  2:40 ` [PATCH 15/20] btrfs-progs: pass cmd_struct to clean_args_no_options{,_relaxed} jeffm
2018-03-08  2:40 ` [PATCH 16/20] btrfs-progs: pass cmd_struct to usage() jeffm
2018-03-08  2:40 ` [PATCH 17/20] btrfs-progs: add support for output formats jeffm
2018-03-08  2:40 ` [PATCH 18/20] btrfs-progs: add generic support for json output jeffm
2018-03-08  2:40 ` [PATCH 19/20] btrfs-progs: qgroups: add json output for usage command jeffm
2018-03-08  2:40 ` [PATCH 20/20] btrfs-progs: handle command groups directly for common case jeffm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=85840b4b-e8c4-d54d-bcf6-b52eaf7e3d5a@suse.com \
    --to=jeffm@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.