On Tue, Oct 06, 2015 at 03:57:51PM +0300, Roman Kagan wrote:
Looks right... The problem is that the statement which runs
unconditionally is
g#cp source target
where, in case the condition evaluates to false, "target" is undefined,
and "source" is anything returned from g#find vio_root, including
directories. I thought that would case an exception one way or another,
but it doesn't...
Something is never going to be undefined in OCaml. There's no such
thing.
At this point it'd be really useful if you could repost the rebased
patches, so I can see the code that we're talking about.
I just came across another problem in the last patch of the series,
though: I accidentally configured libguestfs to use direct backend, and
immediately discovered that reusing the main guestfs handle doesn't work
with it due to the lack of support for hotplugging drives. So I'll need
to reconsider it somehow (perhaps try with hotplug and fall back to
creating a new handle on exception).
Why don't we just use the second handle. The real issue is why the
handle isn't being cleaned up by the GC, which may reveal some deeper
bug somewhere. I only had a brief look at this.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/