Re: [Libguestfs] Help with Win10

Richard W.M. Jones
Tue, 09 Feb 2016 08:35:40 -0000

On Tue, Feb 09, 2016 at 12:20:35AM -0800, Joshua Pincus
wrote:
> Hi Rich,
>
> Thanks for the pointer.  It looks like add_viostor_to_driver_database() is
> the routine that I need to mimic.  I'll try that out in the morning.
I've
> been staring at this problem for so long that my eyes are crossing.

I should note that any doubled \\ that appear in the strings are
really single \, they are just escaped OCaml strings.  It might help
to fire up the OCaml interpreter:

$ rlwrap ocaml
        OCaml version 4.02.3

# open Printf;;
# printf "PCI\\VEN_1AF4&DEV_1001&REV_00\n";;
PCI\VEN_1AF4&DEV_1001&REV_00
- : unit = ()
# let oem_inf = "oem1.inf";;
val oem_inf : string = "oem1.inf"
# printf "@%s,%%rhelscsi.devicedesc%%;Red Hat VirtIO SCSI
controller\n"
    oem_inf;;
@oem1.inf,%rhelscsi.devicedesc%;Red Hat VirtIO SCSI controller
- : unit = ()

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.