mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-16 09:46:55 +00:00
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[] = {
|
static const char * const balance_cmd_group_usage[] = {
|
||||||
"btrfs balance <command> [options] <path>",
|
"btrfs balance <command> [options] <path>",
|
||||||
"btrfs balance <path>",
|
"btrfs balance <path> (deprecated, use 'btrfs balance start')",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -885,6 +885,7 @@ static int cmd_balance(const struct cmd_struct *cmd, int argc, char **argv)
|
|||||||
if (old_syntax) {
|
if (old_syntax) {
|
||||||
struct btrfs_ioctl_balance_args args;
|
struct btrfs_ioctl_balance_args args;
|
||||||
|
|
||||||
|
warning("deprecated syntax, please use 'btrfs balance start'");
|
||||||
memset(&args, 0, sizeof(args));
|
memset(&args, 0, sizeof(args));
|
||||||
args.flags |= BTRFS_BALANCE_TYPE_MASK;
|
args.flags |= BTRFS_BALANCE_TYPE_MASK;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user