+"When the handle is created, a default error handler is installed which "
+"prints the error message string to C<stderr>. For small short-running "
+"command line programs it is sufficient to do:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1224
+#, no-wrap
+msgid ""
+" if (guestfs_launch (g) == -1)\n"
+" exit (EXIT_FAILURE);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1227
+msgid ""
+"since the default error handler will ensure that an error message has been "
+"printed to C<stderr> before the program exits."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1230
+msgid ""
+"For other programs the caller will almost certainly want to install an "
+"alternate error handler or do error handling in-line like this:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1233
+#, no-wrap
+msgid ""
+" g = guestfs_create ();\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1235
+#, no-wrap
+msgid ""
+" /* This disables the default behaviour of printing errors\n"
+" on stderr. */\n"
+" guestfs_set_error_handler (g, NULL, NULL);\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1239
+#, no-wrap
+msgid ""
+" if (guestfs_launch (g) == -1) {\n"
+" /* Examine the error message and print it etc. */\n"
+" char *msg = guestfs_last_error (g);\n"
+" int errnum = guestfs_last_errno (g);\n"
+" fprintf (stderr, \"%s\\n\", msg);\n"
+" /* ... */\n"
+" }\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1247
+msgid ""
+"Out of memory errors are handled differently. The default action is to call "
+"L<abort(3)>. If this is undesirable, then you can set a handler using "
+"L</guestfs_set_out_of_memory_handler>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1251
+msgid ""
+"L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
+"because there is no handle if this happens there is no way to get additional "
+"error information. However L</guestfs_create> is supposed to be a "
+"lightweight operation which can only fail because of insufficient memory (it "
+"returns NULL in this case)."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1257
+msgid "guestfs_last_error"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1259
+#, no-wrap
+msgid ""
+" const char *guestfs_last_error (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1261
+msgid ""
+"This returns the last error message that happened on C<g>. If there has not "
+"been an error since the handle was created, then this returns C<NULL>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1265
+msgid ""
+"The lifetime of the returned string is until the next error occurs, or "
+"L</guestfs_close> is called."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1268
+msgid "guestfs_last_errno"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1270
+#, no-wrap
+msgid ""
+" int guestfs_last_errno (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1272
+msgid "This returns the last error number (errno) that happened on C<g>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1274
+msgid "If successful, an errno integer not equal to zero is returned."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1276
+msgid "If no error, this returns 0. This call can return 0 in three situations:"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1283
+msgid "There has not been any error on the handle."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1287
+msgid ""
+"There has been an error but the errno was meaningless. This corresponds to "
+"the case where the error did not come from a failed system call, but for "
+"some other reason."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1293
+msgid ""
+"There was an error from a failed system call, but for some reason the errno "
+"was not captured and returned. This usually indicates a bug in libguestfs."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1299
+msgid ""
+"Libguestfs tries to convert the errno from inside the applicance into a "
+"corresponding errno for the caller (not entirely trivial: the appliance "
+"might be running a completely different operating system from the library "
+"and error numbers are not standardized across Un*xen). If this could not be "
+"done, then the error is translated to C<EINVAL>. In practice this should "
+"only happen in very rare circumstances."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1307
+msgid "guestfs_set_error_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1309
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
+" void *opaque,\n"
+" const char *msg);\n"
+" void guestfs_set_error_handler (guestfs_h *g,\n"
+" guestfs_error_handler_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1316
+msgid ""
+"The callback C<cb> will be called if there is an error. The parameters "
+"passed to the callback are an opaque data pointer and the error message "
+"string."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1320
+msgid ""
+"C<errno> is not passed to the callback. To get that the callback must call "
+"L</guestfs_last_errno>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1323
+msgid ""
+"Note that the message string C<msg> is freed as soon as the callback "
+"function returns, so if you want to stash it somewhere you must make your "
+"own copy."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1327
+msgid "The default handler prints messages on C<stderr>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1329
+msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1331
+msgid "guestfs_get_error_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1333
+#, no-wrap
+msgid ""
+" guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
+" void **opaque_rtn);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1336
+msgid "Returns the current error handler callback."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1338
+msgid "guestfs_set_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1340
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_abort_cb) (void);\n"
+" int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
+" guestfs_abort_cb);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1344
+msgid ""
+"The callback C<cb> will be called if there is an out of memory situation. "
+"I<Note this callback must not return>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1347
+msgid "The default is to call L<abort(3)>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1349
+msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1352
+msgid "guestfs_get_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1354
+#, no-wrap
+msgid ""
+" guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1356
+msgid "This returns the current out of memory handler."
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1358
+msgid "API CALLS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1360 ../fish/guestfish.pod:908
+msgid "@ACTIONS@"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1362
+msgid "STRUCTURES"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1364
+msgid "@STRUCTS@"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1366
+msgid "AVAILABILITY"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1368
+msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1370
+msgid ""
+"Using L</guestfs_available> you can test availability of the following "
+"groups of functions. This test queries the appliance to see if the "
+"appliance you are currently using supports the functionality."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1375
+msgid "@AVAILABILITY@"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1377
+msgid "GUESTFISH supported COMMAND"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1379
+msgid ""
+"In L<guestfish(3)> there is a handy interactive command C<supported> which "
+"prints out the available groups and whether they are supported by this build "
+"of libguestfs. Note however that you have to do C<run> first."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1384
+msgid "SINGLE CALLS AT COMPILE TIME"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1386
+msgid ""
+"Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
+"function, such as:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1389
+#, no-wrap
+msgid ""
+" #define LIBGUESTFS_HAVE_DD 1\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1391
+msgid "if L</guestfs_dd> is available."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1393
+msgid ""
+"Before version 1.5.8, if you needed to test whether a single libguestfs "
+"function is available at compile time, we recommended using build tools such "
+"as autoconf or cmake. For example in autotools you could use:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1398
+#, no-wrap
+msgid ""
+" AC_CHECK_LIB([guestfs],[guestfs_create])\n"
+" AC_CHECK_FUNCS([guestfs_dd])\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1401
+msgid ""
+"which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
+"in your program."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1404
+msgid "SINGLE CALLS AT RUN TIME"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1406
+msgid ""
+"Testing at compile time doesn't guarantee that a function really exists in "
+"the library. The reason is that you might be dynamically linked against a "
+"previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
+"This situation unfortunately results in a segmentation fault, which is a "
+"shortcoming of the C dynamic linking system itself."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1413
+msgid ""
+"You can use L<dlopen(3)> to test if a function is available at run time, as "
+"in this example program (note that you still need the compile time check as "
+"well):"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1417
+#, no-wrap
+msgid ""
+" #include <stdio.h>\n"
+" #include <stdlib.h>\n"
+" #include <unistd.h>\n"
+" #include <dlfcn.h>\n"
+" #include <guestfs.h>\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1423
+#, no-wrap
+msgid ""
+" main ()\n"