type t
exception Error of string
external create : unit -> t = "ocaml_guestfs_create"
-external close : t -> unit = "ocaml_guestfs_create"
-external launch : t -> unit = "ocaml_guestfs_launch"
-external wait_ready : t -> unit = "ocaml_guestfs_wait_ready"
-external kill_subprocess : t -> unit = "ocaml_guestfs_kill_subprocess"
-external add_drive : t -> string -> unit = "ocaml_guestfs_add_drive"
-external add_cdrom : t -> string -> unit = "ocaml_guestfs_add_cdrom"
-external config : t -> string -> string option -> unit = "ocaml_guestfs_config"
-external set_path : t -> string option -> unit = "ocaml_guestfs_set_path"
-external get_path : t -> string = "ocaml_guestfs_get_path"
-external set_autosync : t -> bool -> unit = "ocaml_guestfs_set_autosync"
-external get_autosync : t -> bool = "ocaml_guestfs_get_autosync"
-external set_verbose : t -> bool -> unit = "ocaml_guestfs_set_verbose"
-external get_verbose : t -> bool = "ocaml_guestfs_get_verbose"
+external close : t -> unit = "ocaml_guestfs_close"
+
+let () =
+ Callback.register_exception "ocaml_guestfs_error" (Error "")
type lvm_pv = {
pv_name : string;
modules : string;
}
-external cat : t -> string -> string = "ocaml_guestfs_cat"
-external list_devices : t -> string list = "ocaml_guestfs_list_devices"
-external list_partitions : t -> string list = "ocaml_guestfs_list_partitions"
-external ll : t -> string -> string = "ocaml_guestfs_ll"
-external ls : t -> string -> string list = "ocaml_guestfs_ls"
-external lvs : t -> string list = "ocaml_guestfs_lvs"
-external lvs_full : t -> lvm_lv list = "ocaml_guestfs_lvs_full"
+external launch : t -> unit = "ocaml_guestfs_launch"
+external wait_ready : t -> unit = "ocaml_guestfs_wait_ready"
+external kill_subprocess : t -> unit = "ocaml_guestfs_kill_subprocess"
+external add_drive : t -> string -> unit = "ocaml_guestfs_add_drive"
+external add_cdrom : t -> string -> unit = "ocaml_guestfs_add_cdrom"
+external config : t -> string -> string option -> unit = "ocaml_guestfs_config"
+external set_path : t -> string -> unit = "ocaml_guestfs_set_path"
+external get_path : t -> string = "ocaml_guestfs_get_path"
+external set_autosync : t -> bool -> unit = "ocaml_guestfs_set_autosync"
+external get_autosync : t -> bool = "ocaml_guestfs_get_autosync"
+external set_verbose : t -> bool -> unit = "ocaml_guestfs_set_verbose"
+external get_verbose : t -> bool = "ocaml_guestfs_get_verbose"
external mount : t -> string -> string -> unit = "ocaml_guestfs_mount"
-external pvs : t -> string list = "ocaml_guestfs_pvs"
-external pvs_full : t -> lvm_pv list = "ocaml_guestfs_pvs_full"
external sync : t -> unit = "ocaml_guestfs_sync"
external touch : t -> string -> unit = "ocaml_guestfs_touch"
-external vgs : t -> string list = "ocaml_guestfs_vgs"
-external vgs_full : t -> lvm_vg list = "ocaml_guestfs_vgs_full"
+external cat : t -> string -> string = "ocaml_guestfs_cat"
+external ll : t -> string -> string = "ocaml_guestfs_ll"
+external ls : t -> string -> string array = "ocaml_guestfs_ls"
+external list_devices : t -> string array = "ocaml_guestfs_list_devices"
+external list_partitions : t -> string array = "ocaml_guestfs_list_partitions"
+external pvs : t -> string array = "ocaml_guestfs_pvs"
+external vgs : t -> string array = "ocaml_guestfs_vgs"
+external lvs : t -> string array = "ocaml_guestfs_lvs"
+external pvs_full : t -> lvm_pv array = "ocaml_guestfs_pvs_full"
+external vgs_full : t -> lvm_vg array = "ocaml_guestfs_vgs_full"
+external lvs_full : t -> lvm_lv array = "ocaml_guestfs_lvs_full"
+external read_lines : t -> string -> string array = "ocaml_guestfs_read_lines"