From 1fb19fcad3c2aa572951bddcecd01a93b8c469b2 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 31 Aug 2014 13:35:33 +0100 Subject: [PATCH] customize: perl_edit: Type of Guestfs_val() param is a Guestfs.t not the object wrapper. This fixes commit c6b7e6cddac850d6d2caf2e2f3060467c38397fe. --- customize/customize_run.ml | 2 +- customize/perl_edit-c.c | 7 +++---- customize/perl_edit.ml | 2 +- customize/perl_edit.mli | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/customize/customize_run.ml b/customize/customize_run.ml index 060eca3b3..af513f0cf 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -193,7 +193,7 @@ exec >>%s 2>&1 exit 1 ); - Perl_edit.edit_file ~verbose g path expr + Perl_edit.edit_file ~verbose g#ocaml_handle path expr | `FirstbootCommand cmd -> incr i; diff --git a/customize/perl_edit-c.c b/customize/perl_edit-c.c index 92126f909..d467cb1d4 100644 --- a/customize/perl_edit-c.c +++ b/customize/perl_edit-c.c @@ -38,14 +38,13 @@ #pragma GCC diagnostic ignored "-Wmissing-prototypes" value -virt_customize_edit_file_perl (value verbosev, value guestfsv, value filev, +virt_customize_edit_file_perl (value verbosev, value gv, value filev, value exprv) { - CAMLparam4 (verbosev, guestfsv, filev, exprv); + CAMLparam4 (verbosev, gv, filev, exprv); int r; - guestfs_h *g; + guestfs_h *g = Guestfs_val (gv); - g = Guestfs_val (guestfsv); r = edit_file_perl (g, String_val (filev), String_val (exprv), NULL, Bool_val (verbosev)); if (r == -1) diff --git a/customize/perl_edit.ml b/customize/perl_edit.ml index c73443814..96c406252 100644 --- a/customize/perl_edit.ml +++ b/customize/perl_edit.ml @@ -16,5 +16,5 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -external edit_file : verbose:bool -> Guestfs.guestfs -> string -> string -> unit +external edit_file : verbose:bool -> Guestfs.t -> string -> string -> unit = "virt_customize_edit_file_perl" diff --git a/customize/perl_edit.mli b/customize/perl_edit.mli index e84ac0820..dbb76c9e4 100644 --- a/customize/perl_edit.mli +++ b/customize/perl_edit.mli @@ -16,4 +16,4 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *) -val edit_file : verbose:bool -> Guestfs.guestfs -> string -> string -> unit +val edit_file : verbose:bool -> Guestfs.t -> string -> string -> unit