tst_device: Split the tst_acquire_device code again

This splits the tst_acquire_device code into two parts so that the
function with two underscores returns exit value rather than calling
tst_brkm() with a cleanup pointer.

Once this is done we can reuse the code in shell helper binary so that
we have all the device related code in a single place.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Acked-by: Jan Stancek <jstancek@redhat.com>
2 files changed