btrfs-progs: balance: warn when deprecated syntax is used
Deprecate old 'btrfs balance' syntax since new syntax has been introduced in 2012. We will remove the old syntax completely in a few releases. Signed-off-by: Wang Yugui <wangyugui@e16-tech.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6f7151f499
commit
7ff278ba3d
|
@ -37,7 +37,7 @@
|
|||
|
||||
static const char * const balance_cmd_group_usage[] = {
|
||||
"btrfs balance <command> [options] <path>",
|
||||
"btrfs balance <path>",
|
||||
"btrfs balance <path> (deprecated, use 'btrfs balance start')",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -885,6 +885,7 @@ static int cmd_balance(const struct cmd_struct *cmd, int argc, char **argv)
|
|||
if (old_syntax) {
|
||||
struct btrfs_ioctl_balance_args args;
|
||||
|
||||
warning("deprecated syntax, please use 'btrfs balance start'");
|
||||
memset(&args, 0, sizeof(args));
|
||||
args.flags |= BTRFS_BALANCE_TYPE_MASK;
|
||||
|
||||
|
|
Loading…
Reference in New Issue