>From 26a2aa2a2b4440e170c51c7ee82cba31d65b78ea Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Fri, 12 Feb 2010 13:42:57 +0000 Subject: [PATCH 1/2] perl: Don't prefix error messages with command name. The command name is already being added by the RPC stubs, so adding it again in Perl just results in doubled error messages like: foo: foo: the error --- src/generator.ml | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/generator.ml b/src/generator.ml index 607b6d1..b0ffc58 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -8149,7 +8149,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (r == -1)\n"; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; | RInt n | RBool n -> pr "PREINIT:\n"; @@ -8160,7 +8160,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == -1)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " RETVAL = newSViv (%s);\n" n; pr " OUTPUT:\n"; pr " RETVAL\n" @@ -8173,7 +8173,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == -1)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " RETVAL = my_newSVll (%s);\n" n; pr " OUTPUT:\n"; pr " RETVAL\n" @@ -8186,7 +8186,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == NULL)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " RETVAL = newSVpv (%s, 0);\n" n; pr " OUTPUT:\n"; pr " RETVAL\n" @@ -8213,7 +8213,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == NULL)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " RETVAL = newSVpv (%s, 0);\n" n; pr " free (%s);\n" n; pr " OUTPUT:\n"; @@ -8228,7 +8228,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == NULL)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " for (n = 0; %s[n] != NULL; ++n) /**/;\n" n; pr " EXTEND (SP, n);\n"; pr " for (i = 0; i < n; ++i) {\n"; @@ -8252,7 +8252,7 @@ DESTROY (g) pr ";\n"; do_cleanups (); pr " if (%s == NULL)\n" n; - pr " croak (\"%s: %%s\", guestfs_last_error (g));\n" name; + pr " croak (\"%%s\", guestfs_last_error (g));\n"; pr " RETVAL = newSVpv (%s, size);\n" n; pr " free (%s);\n" n; pr " OUTPUT:\n"; -- 1.6.5.2