Second version. I have tested these and they work.
The earlier version of the patch which modified the mount-vfs call so
that the Device parameter became a String would not have worked
properly. It would mean that device name translation[1] would not
have been done on that parameter any longer.
I also considered changing all the mount calls so that they take a
string instead of a device name, and then doing device name
translation manually (ie. calling RESOLVE_DEVICE conditionally, as is
done in do_umount[2]). This would also allow bind mounts, but would
also lead to a very complex do_mount_vfs[3] implementation.
So this implements a separate API: guestfs_mount_9p, specifically for
this purpose of mounting 9p filesystems discovered through
guestfs_list_9p. The advantage of having an API is it's simple and
specialized, and we can deprecate it later if we find a better way to
do it.
Please test it, and tell me if it works for you.
Rich.
[1]
http://libguestfs.org/guestfs.3.html#algorithm_for_block_device_name_tran...
[2]
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/mount.c;h=be289d...
[3]
http://git.annexia.org/?p=libguestfs.git;a=blob;f=daemon/mount.c;h=be289d...
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v