[Libguestfs] [hivex PATCH] perl: fix format of croak for RLenValue
Richard W.M. Jones
rjones at redhat.com
Thu Jan 17 13:40:38 UTC 2019
On Wed, Jan 16, 2019 at 06:52:30PM +0100, Pino Toscano wrote:
> When calling croak on failure in the Perl code for RLenValue, add the
> %s placeholder for the strerror result. This makes the croak call just
> like all the others.
>
> Fixes commit 87e1be8ff3431ac81d721d5f647fc85d02e045dc.
> ---
> generator/generator.ml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/generator/generator.ml b/generator/generator.ml
> index 0401217..f2cb627 100755
> --- a/generator/generator.ml
> +++ b/generator/generator.ml
> @@ -2743,7 +2743,7 @@ DESTROY (h)
> name (String.concat ", " c_params);
> free_args ();
> pr " if (r == 0 && errno)\n";
> - pr " croak (\"%%s: \", \"%s\", strerror (errno));\n"
> + pr " croak (\"%%s: %%s\", \"%s\", strerror (errno));\n"
> name;
> pr " EXTEND (SP, 2);\n";
> pr " PUSHs (sv_2mortal (newSViv (len)));\n";
> --
ACK
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.
http://people.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list