summaryrefslogtreecommitdiffstats
path: root/ocaml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-08-02 17:21:47 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-08-02 17:21:47 +0100
commit863168467f14e33407c4bf9c7f790bcd4911aea3 (patch)
tree85742a492a5fda865939294fa3d998b46cf37783 /ocaml
parentb3d0cc0588845d3cad3fd67943d93e1bd87b1700 (diff)
downloadlibguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.tar.gz
libguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.tar.xz
libguestfs-863168467f14e33407c4bf9c7f790bcd4911aea3.zip
examples: Use add_drive_opts function in examples.
In libguestfs 1.20, you will be able to use 'add_drive' instead of 'add_drive_opts' (except in the C bindings). However until libguestfs 1.20 is the minimum stable version people will still be using old versions where you have to use 'add_drive_opts'. This makes the examples confusing. Therefore continue to use 'add_drive_opts' in the examples for now.
Diffstat (limited to 'ocaml')
-rw-r--r--ocaml/examples/create_disk.ml2
-rw-r--r--ocaml/examples/guestfs-ocaml.pod4
-rw-r--r--ocaml/examples/inspect_vm.ml2
3 files changed, 4 insertions, 4 deletions
diff --git a/ocaml/examples/create_disk.ml b/ocaml/examples/create_disk.ml
index fab5e701..4437b1c8 100644
--- a/ocaml/examples/create_disk.ml
+++ b/ocaml/examples/create_disk.ml
@@ -17,7 +17,7 @@ let () =
g#set_trace true;
(* Attach the disk image to libguestfs. *)
- g#add_drive ~format:"raw" ~readonly:false output;
+ g#add_drive_opts ~format:"raw" ~readonly:false output;
(* Run the libguestfs back-end. *)
g#launch ();
diff --git a/ocaml/examples/guestfs-ocaml.pod b/ocaml/examples/guestfs-ocaml.pod
index 019e84a3..139997b8 100644
--- a/ocaml/examples/guestfs-ocaml.pod
+++ b/ocaml/examples/guestfs-ocaml.pod
@@ -9,13 +9,13 @@ guestfs-ocaml - How to use libguestfs from OCaml
Module style:
let g = Guestfs.create () in
- Guestfs.add_drive g ~format:"raw" ~readonly:true "disk.img";
+ Guestfs.add_drive_opts g ~format:"raw" ~readonly:true "disk.img";
Guestfs.launch g;
Object-oriented style:
let g = new Guestfs.guestfs () in
- g#add_drive ~format:"raw" ~readonly:true "disk.img";
+ g#add_drive_opts ~format:"raw" ~readonly:true "disk.img";
g#launch ();
ocamlfind opt prog.ml -package guestfs -linkpkg -o prog
diff --git a/ocaml/examples/inspect_vm.ml b/ocaml/examples/inspect_vm.ml
index c19953b4..44d348e7 100644
--- a/ocaml/examples/inspect_vm.ml
+++ b/ocaml/examples/inspect_vm.ml
@@ -12,7 +12,7 @@ let () =
let g = new Guestfs.guestfs () in
(* Attach the disk image read-only to libguestfs. *)
- g#add_drive (*~format:"raw"*) ~readonly:true disk;
+ g#add_drive_opts (*~format:"raw"*) ~readonly:true disk;
(* Run the libguestfs back-end. *)
g#launch ();