btrfs-progs: drop weird indirections & dead code from send/receive

cmds-recieve.c & cmds-send.c seem to have weird wrappers and
indirections, and "groups" of commands which have only
one member, which are never referenced in the code.

I think these can be removed.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
master
Eric Sandeen 2013-08-02 20:24:55 -05:00 committed by David Sterba
parent 4e8c4d4ba7
commit 514aa5d8f1
3 changed files with 2 additions and 31 deletions

View File

@ -907,7 +907,7 @@ out:
return ret;
}
static int do_cmd_receive(int argc, char **argv)
int cmd_receive(int argc, char **argv)
{
int c;
char *tomnt = NULL;
@ -960,11 +960,6 @@ static int do_cmd_receive(int argc, char **argv)
return ret;
}
static const char * const receive_cmd_group_usage[] = {
"btrfs receive <command> <args>",
NULL
};
const char * const cmd_receive_usage[] = {
"btrfs receive [-ve] [-f <infile>] <mount>",
"Receive subvolumes from stdin.",
@ -988,15 +983,3 @@ const char * const cmd_receive_usage[] = {
" is recognized or on EOF.",
NULL
};
const struct cmd_group receive_cmd_group = {
receive_cmd_group_usage, NULL, {
{ "receive", do_cmd_receive, cmd_receive_usage, NULL, 0 },
{ 0, 0, 0, 0, 0 },
},
};
int cmd_receive(int argc, char **argv)
{
return do_cmd_receive(argc, argv);
}

View File

@ -465,7 +465,7 @@ out:
return ret;
}
int cmd_send_start(int argc, char **argv)
int cmd_send(int argc, char **argv)
{
char *subvol = NULL;
int c;
@ -718,11 +718,6 @@ out:
return ret;
}
static const char * const send_cmd_group_usage[] = {
"btrfs send <command> <args>",
NULL
};
const char * const cmd_send_usage[] = {
"btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol>",
"Send the subvolume to stdout.",
@ -750,8 +745,3 @@ const char * const cmd_send_usage[] = {
" use pipes.",
NULL
};
int cmd_send(int argc, char **argv)
{
return cmd_send_start(argc, argv);
}

View File

@ -85,8 +85,6 @@ extern const struct cmd_group balance_cmd_group;
extern const struct cmd_group device_cmd_group;
extern const struct cmd_group scrub_cmd_group;
extern const struct cmd_group inspect_cmd_group;
extern const struct cmd_group send_cmd_group;
extern const struct cmd_group receive_cmd_group;
extern const struct cmd_group quota_cmd_group;
extern const struct cmd_group qgroup_cmd_group;
extern const struct cmd_group replace_cmd_group;