diff options
author | Eryu Guan <guaneryu@gmail.com> | 2014-10-10 21:16:16 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-11-03 18:35:30 +0100 |
commit | 39893bb15ef39ee2ed254d931faf9c67d6c47e37 (patch) | |
tree | 981b505484cefc9e5fb16fe4d6f9384799bc22e8 /utils.h | |
parent | 44cdb62d3478c834f41c87ea79d261b9c8982dce (diff) |
btrfs-progs: only report internal dev replace result if there's a result
If BTRFS_IOC_DEV_REPLACE ioctl failed, args.result usually won't be
updated by the ioctl.
And the arg has been initialized with 0, the result is always 0, which
is BTRFS_IOCTL_DEV_REPLACE_RESULT_NO_ERROR, and the resulting error
message looks confusing:
ERROR: ioctl(DEV_REPLACE_START) failed on "/mnt/btrfs": No such file or directory, no error
But in case there's an internal result returned in future, don't drop
the result completely, instead print dev replace result message only
if the result is updated by a failed ioctl call.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
0 files changed, 0 insertions, 0 deletions