summaryrefslogtreecommitdiff
path: root/cmds-restore.c
diff options
context:
space:
mode:
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>2015-04-21 23:38:47 -0400
committerDavid Sterba <dsterba@suse.cz>2015-04-24 15:42:04 +0200
commit7ab0bdd7125c098670a6c2bb9d6bb95c1aaa78ed (patch)
tree937244561f71753163289b46f94cf58d1b7f027d /cmds-restore.c
parent2890c415049e588db84c7ef6534d24be408c1c81 (diff)
btrfs-progs: report failure when resize ioctl fails
The BTRFS_IOC_RESIZE ioctl returns 0 on success, negative for POSIX errors, and positive for btrfs-specific errors. If resize fails with a btrfs-specific error, decode the error and report it. If we can't decode the error, report its numeric value so that the userspace tool is not instantly useless when a new error code is defined in the kernel. Exit with non-zero status on any resize error. This is very important for scripts that will shrink the underlying storage when btrfs reports success! Signed-off-by: Zygo Blaxell <ce3g8jdj@umail.furryterror.org Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-restore.c')
0 files changed, 0 insertions, 0 deletions