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