btrfs-progs: move command definitions to commands.h

There are some trivial helpers, we can group the command declarations in
one place.

Signed-off-by: David Sterba <dsterba@suse.com>
master
David Sterba 2017-08-24 18:32:18 +02:00
parent d7dd9d00e9
commit a67efe4362
12 changed files with 10 additions and 110 deletions

View File

@ -20,7 +20,6 @@
#include "volumes.h"
#include "utils.h"
#include "commands.h"
#include "cmds-inspect-dump-tree.h"
#include "help.h"
int main(int argc, char **argv)

View File

@ -1,23 +0,0 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License v2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef __CMDS_FILESYSTEM_DU_H__
#define __CMDS_FILESYSTEM_DU_H__
extern const char * const cmd_filesystem_du_usage[];
int cmd_filesystem_du(int argc, char **argv);
#endif /* __CMDS_FILESYSTEM_DU_H__ */

View File

@ -22,9 +22,6 @@
#include "kerncompat.h"
#include "ioctl.h"
extern const char * const cmd_filesystem_usage_usage[];
int cmd_filesystem_usage(int argc, char **argv);
struct device_info {
u64 devid;
char path[BTRFS_DEVICE_PATH_NAME_MAX];

View File

@ -37,7 +37,6 @@
#include "cmds-fi-usage.h"
#include "list_sort.h"
#include "disk-io.h"
#include "cmds-fi-du.h"
#include "help.h"
/*

View File

@ -33,7 +33,6 @@
#include "utils.h"
#include "commands.h"
#include "crc32c.h"
#include "cmds-inspect-dump-super.h"
#include "help.h"
static int check_csum_sblock(void *sb, int csum_size)

View File

@ -1,26 +0,0 @@
/*
* Copyright (C) 2012 STRATO AG. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License v2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef __CMDS_INSPECT_DUMP_SUPER_H__
#define __CMDS_INSPECT_DUMP_SUPER_H__
int cmd_inspect_dump_super(int argc, char **argv);
extern const char * const cmd_inspect_dump_super_usage[];
#endif

View File

@ -31,7 +31,6 @@
#include "volumes.h"
#include "commands.h"
#include "utils.h"
#include "cmds-inspect-dump-tree.h"
#include "help.h"
static void print_extents(struct btrfs_root *root, struct extent_buffer *eb)

View File

@ -1,24 +0,0 @@
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License v2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef __CMDS_INSPECT_DUMP_TREE_H__
#define __CMDS_INSPECT_DUMP_TREE_H__
int cmd_inspect_dump_tree(int argc, char **argv);
extern const char * const cmd_inspect_dump_tree_usage[];
#endif

View File

@ -35,7 +35,6 @@
#include "volumes.h"
#include "utils.h"
#include "commands.h"
#include "cmds-inspect-tree-stats.h"
#include "help.h"
static int verbose = 0;

View File

@ -1,26 +0,0 @@
/*
* Copyright (C) 2011 Red Hat. All rights reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License v2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 021110-1307, USA.
*/
#ifndef __CMDS_INSPECT_TREE_STATS_H__
#define __CMDS_INSPECT_TREE_STATS_H__
int cmd_inspect_tree_stats(int argc, char **argv);
extern const char * const cmd_inspect_tree_stats_usage[];
#endif

View File

@ -31,9 +31,6 @@
#include "disk-io.h"
#include "commands.h"
#include "btrfs-list.h"
#include "cmds-inspect-dump-tree.h"
#include "cmds-inspect-dump-super.h"
#include "cmds-inspect-tree-stats.h"
#include "help.h"
static const char * const inspect_cmd_group_usage[] = {

View File

@ -89,9 +89,16 @@ extern const char * const cmd_chunk_recover_usage[];
extern const char * const cmd_super_recover_usage[];
extern const char * const cmd_restore_usage[];
extern const char * const cmd_rescue_usage[];
extern const char * const cmd_inspect_dump_super_usage[];
extern const char * const cmd_inspect_dump_tree_usage[];
extern const char * const cmd_inspect_tree_stats_usage[];
extern const char * const cmd_filesystem_du_usage[];
extern const char * const cmd_filesystem_usage_usage[];
int cmd_subvolume(int argc, char **argv);
int cmd_filesystem(int argc, char **argv);
int cmd_filesystem_du(int argc, char **argv);
int cmd_filesystem_usage(int argc, char **argv);
int cmd_balance(int argc, char **argv);
int cmd_device(int argc, char **argv);
int cmd_scrub(int argc, char **argv);
@ -99,6 +106,9 @@ int cmd_check(int argc, char **argv);
int cmd_chunk_recover(int argc, char **argv);
int cmd_super_recover(int argc, char **argv);
int cmd_inspect(int argc, char **argv);
int cmd_inspect_dump_super(int argc, char **argv);
int cmd_inspect_dump_tree(int argc, char **argv);
int cmd_inspect_tree_stats(int argc, char **argv);
int cmd_property(int argc, char **argv);
int cmd_send(int argc, char **argv);
int cmd_receive(int argc, char **argv);