I`m building again and test, I`ll give some feedback later. :) ________________________________ From: Richard W.M. Jones <rjones@redhat.com> To: THO HUYNH <feeliwood@yahoo.com>; libguestfs@redhat.com Sent: Friday, 30 March 2012, 22:20 Subject: Re: modifying open_guest function (copy_over.c) [Please keep questions on the mailing list] On Fri, Mar 30, 2012 at 07:39:41AM -0700, THO HUYNH wrote:
This is open_guest function that I modified. Could you take a look to check if anything wrong :) I only modified this function, the rest of the copy_over.c still remain.
Thanks.
static int
open_guest (guestfs_h *g, const char *dom, int readonly) { /* Use libvirt to find the guest disks and add them to the handle. */ if (guestfs_add_domain (g, dom, GUESTFS_ADD_DOMAIN_LIVE, 1, -1) == -1) return -1;
if (guestfs_launch (g) == -1) return -1;
/* Everything ready, no error. */ return 0; }
Seems reasonable. Does it work? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/