path: root/cmds-device.c
diff options
authorEryu Guan <>2014-10-10 21:16:16 +0800
committerDavid Sterba <>2014-11-03 18:35:30 +0100
commit39893bb15ef39ee2ed254d931faf9c67d6c47e37 (patch)
tree981b505484cefc9e5fb16fe4d6f9384799bc22e8 /cmds-device.c
parent44cdb62d3478c834f41c87ea79d261b9c8982dce (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 <> Signed-off-by: David Sterba <>
Diffstat (limited to 'cmds-device.c')
0 files changed, 0 insertions, 0 deletions