btrfs-progs: inspect: add build conditionals around list-chunk

In default build there's a warning (reported by CI) that the
experimental list-chunk command and related functions are not used, so
add the condition there as well.

  In file included from cmds/inspect.c:45:
  ./cmds/commands.h:67:26: warning: 'cmd_struct_inspect_list_chunks' defined but not used [-Wunused-const-variable=]
   #define __CMD_NAME(name) cmd_struct_ ##name
			    ^~~~~~~~~~~
  ./cmds/commands.h:73:26: note: in expansion of macro '__CMD_NAME'
    const struct cmd_struct __CMD_NAME(name) =   \
			    ^~~~~~~~~~
  ./cmds/commands.h:88:2: note: in expansion of macro 'DEFINE_COMMAND'
    DEFINE_COMMAND(name, token, cmd_ ##name,   \
    ^~~~~~~~~~~~~~
  cmds/inspect.c:1115:8: note: in expansion of macro 'DEFINE_SIMPLE_COMMAND'
   static DEFINE_SIMPLE_COMMAND(inspect_list_chunks, "list-chunks");
	  ^~~~~~~~~~~~~~~~~~~~~

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-01-05 14:55:56 +01:00
parent d6fc49d1dd
commit 6fd4241e87

View file

@ -692,6 +692,8 @@ out:
}
static DEFINE_SIMPLE_COMMAND(inspect_min_dev_size, "min-dev-size");
#if EXPERIMENTAL
static const char * const cmd_inspect_list_chunks_usage[] = {
"btrfs inspect-internal list-chunks [options] <path>",
"Show chunks (block groups) layout",
@ -1114,6 +1116,8 @@ out_nomem:
}
static DEFINE_SIMPLE_COMMAND(inspect_list_chunks, "list-chunks");
#endif
static const char * const cmd_inspect_map_swapfile_usage[] = {
"btrfs inspect-internal map-swapfile <file>",
"Print physical offset of first block and resume offset if file is suitable as swapfile",