crosvm/qcow_utils
Zach Reizner 94923406ae qcow_utils: do not close given fds in convert_to_* functions
The `convert_to_*` functions take ownership of the passed FDs even
though they should not according to the function's contract. This change
clones the passed FDs so that the caller can retain ownership of its
FDs.

This change also wraps most of the implementations in catch_unwind so
that panics do not unwind past FFI boundaries, which is undefined
behavior.

BUG=chromium:905799
TEST=in crosh: `vmc export <vm name> <file name>`

Change-Id: I2f65ebff51243675d0854574d8fd02cec1b237a4
Reviewed-on: https://chromium-review.googlesource.com/1338501
Commit-Ready: Zach Reizner <zachr@chromium.org>
Tested-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2018-11-16 05:01:42 -08:00
..
src qcow_utils: do not close given fds in convert_to_* functions 2018-11-16 05:01:42 -08:00
Cargo.toml qcow: Add a utility program for qcow analysis 2018-09-19 15:40:06 -07:00
libqcow_utils.pc.in qcow_utils: add pkgconfig script 2018-02-01 21:29:32 -08:00
platform2_preinstall.sh qcow_utils: add pkgconfig script 2018-02-01 21:29:32 -08:00