diff options
author | David Sterba <dsterba@suse.com> | 2016-01-11 11:01:47 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-12 15:02:51 +0100 |
commit | 3d6f61f8cb6ae24b2ff7494e48d635ef29570b5d (patch) | |
tree | 36d78e442946704c63ac0dc5f0b0fe6bd1cb7567 | |
parent | 6bc6e850eefeb25547077e5314de2952db678576 (diff) |
btrfs-progs: cmd quota: switch to common error message wrapper
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | cmds-quota.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/cmds-quota.c b/cmds-quota.c index efbc3eff..34b8dacf 100644 --- a/cmds-quota.c +++ b/cmds-quota.c @@ -53,8 +53,7 @@ static int quota_ctl(int cmd, int argc, char **argv) e = errno; close_file_or_dir(fd, dirstream); if (ret < 0) { - fprintf(stderr, "ERROR: quota command failed: %s\n", - strerror(e)); + error("quota command failed: %s", strerror(e)); return 1; } return 0; @@ -129,7 +128,7 @@ static int cmd_quota_rescan(int argc, char **argv) } if (ioctlnum != BTRFS_IOC_QUOTA_RESCAN && wait_for_completion) { - fprintf(stderr, "ERROR: -w cannot be used with -s\n"); + error("switch -w cannot be used with -s"); return 1; } @@ -154,8 +153,7 @@ static int cmd_quota_rescan(int argc, char **argv) if (ioctlnum == BTRFS_IOC_QUOTA_RESCAN) { if (ret < 0) { - fprintf(stderr, "ERROR: quota rescan failed: " - "%s\n", strerror(e)); + error("quota rescan failed: %s", strerror(e)); return 1; } else { printf("quota rescan started\n"); |