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.
> 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)
> /* Everything ready, no error. */
> return 0;
Seems reasonable. Does it work?
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/