blockdev: clean up error handling in do_open_tray
authorColin Lord <clord@redhat.com>
Mon, 6 Jun 2016 18:15:22 +0000 (14:15 -0400)
committerKevin Wolf <kwolf@redhat.com>
Wed, 8 Jun 2016 08:21:09 +0000 (10:21 +0200)
commitbf18bee547d19fde314e7b6b81f21f68b46c8a92
tree5af96a2d939c297aa695eb5934d799292b5714e5
parent2a9170bcd4980cdd75791f3aa0f762c5e53334bb
blockdev: clean up error handling in do_open_tray

Returns negative error codes and accompanying error messages in cases where
the device has no tray or the tray is locked and isn't forced open. This
extra information should result in better flexibility in functions that
call do_open_tray.

Suggested by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Colin Lord <clord@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
blockdev.c