On Thu, Feb 09, 2017 at 09:13:24PM +0000, Richard W.M. Jones wrote:
On Thu, Feb 09, 2017 at 03:24:53PM +0500, MUHAMMAD MOHSIN wrote:
* but it returns following error (error: copy_device_to_file: unknown option 689330304 (this can happen if a program is compiled against a newer version of libguestfs, then dynamically linked to an older version)). Please see attached main.c for my sample code.
I don't know about the above error,
Actually I've realized what's wrong that's giving the above error too.
guestfs_copy_device_to_file(g, "/dev/sda1/file-to extract.exe", "/abc.exe");
This API takes a variable list of parameters terminated with -1, and since you've omitted that, it's reading off the end of the args. http://libguestfs.org/guestfs.3.html#guestfs_copy_device_to_file You probably shouldn't be using that API so this doesn't matter, but it's best to clear it up. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top