X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=cmds-balance.c;h=0c91bdf13ada190fa3ce136fdeb589f47670eeb0;hb=335b7011352bfe27d59094d622abe111177021d4;hp=c9f1288a7d4171c217cae840fb79c25bd582267e;hpb=6cd3ed9e7e351ddda4017b273da1b900f7ed1e34;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/cmds-balance.c b/cmds-balance.c index c9f1288..0c91bdf 100644 --- a/cmds-balance.c +++ b/cmds-balance.c @@ -32,6 +32,7 @@ #include "commands.h" #include "utils.h" +#include "help.h" static const char * const balance_cmd_group_usage[] = { "btrfs balance [options] ", @@ -442,7 +443,7 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, printf("WARNING:\n\n"); printf("\tFull balance without filters requested. This operation is very\n"); printf("\tintense and takes potentially very long. It is recommended to\n"); - printf("\tuse the balance filters to narrow down the balanced data.\n"); + printf("\tuse the balance filters to narrow down the scope of balance.\n"); printf("\tUse 'btrfs balance start --full-balance' option to skip this\n"); printf("\twarning. The operation will start in %d seconds.\n", delay); printf("\tUse Ctrl-C to stop it.\n"); @@ -474,8 +475,7 @@ static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args, fprintf(stderr, "balance canceled by user\n"); ret = 0; } else { - error("error during balancing '%s': %s", path, - strerror(errno)); + error("error during balancing '%s': %m", path); if (errno != EINPROGRESS) fprintf(stderr, "There may be more info in syslog - try dmesg | tail\n"); @@ -510,7 +510,8 @@ static const char * const cmd_balance_start_usage[] = { "-v be verbose", "-f force reducing of metadata integrity", "--full-balance do not print warning and do not delay start", - "--background run the balance as a background process", + "--background|--bg", + " run the balance as a background process", NULL }; @@ -540,6 +541,7 @@ static int cmd_balance_start(int argc, char **argv) GETOPT_VAL_FULL_BALANCE }, { "background", no_argument, NULL, GETOPT_VAL_BACKGROUND }, + { "bg", no_argument, NULL, GETOPT_VAL_BACKGROUND }, { NULL, 0, NULL, 0 } }; @@ -791,9 +793,9 @@ static int cmd_balance_resume(int argc, char **argv) else ret = 1; } else { - error("error during balancing '%s': %s\n" + error("error during balancing '%s': %m\n" "There may be more info in syslog - try dmesg | tail", - path, strerror(errno)); + path); ret = 1; } } else { @@ -865,7 +867,7 @@ static int cmd_balance_status(int argc, char **argv) ret = 0; goto out; } - error("balance status on '%s' failed: %s", path, strerror(errno)); + error("balance status on '%s' failed: %m", path); ret = 2; goto out; }