On Tue, Jul 15, 2014 at 03:33:12PM +0400, Vasiliy Tolstov wrote:
Hi. I'm try to use guestfish inside golang (extract some files
from
image and create squashfs from root).
Now i can't understand how can i work with mount-local/mount-local-run.
Where i can specify what partition i'm export to local? Does i need
firstly mount /dev/sda1 to / for example and after that run
mount-local /tmp/xxx ?
Have a look at this example:
https://github.com/libguestfs/libguestfs/blob/master/examples/mount-local.c
As Pino says, it exports the root directory from the "libguestfs API space".
Second - i'm work with guestfish via writing to stdin and
getting
result from stdout. In case of mount-local-run does i need fully fork
new binary or i can only dup stdin descriptor and work with it?
Not sure I understand the question, but the guestfish mount-local-run
command will block guestfish until another process runs
'fusermount -u /mntpoint' (or better, 'guestunmount /mntpoint').
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW