+" g = guestfs_create ();\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1289
+#, 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
+#. type: verbatim
+#: ../src/guestfs.pod:1293
+#, 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
+#. type: textblock
+#: ../src/guestfs.pod:1301
+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
+#. type: textblock
+#: ../src/guestfs.pod:1305
+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
+#. type: =head2
+#: ../src/guestfs.pod:1311
+msgid "guestfs_last_error"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1313
+#, no-wrap
+msgid ""
+" const char *guestfs_last_error (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1315
+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
+#. type: textblock
+#: ../src/guestfs.pod:1319
+msgid ""
+"The lifetime of the returned string is until the next error occurs, or L</"
+"guestfs_close> is called."
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1322
+msgid "guestfs_last_errno"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1324
+#, no-wrap
+msgid ""
+" int guestfs_last_errno (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1326
+msgid "This returns the last error number (errno) that happened on C<g>."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1328
+msgid "If successful, an errno integer not equal to zero is returned."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1330
+msgid ""
+"If no error, this returns 0. This call can return 0 in three situations:"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1337
+msgid "There has not been any error on the handle."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1341
+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
+#. type: textblock
+#: ../src/guestfs.pod:1347
+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
+#. type: textblock
+#: ../src/guestfs.pod:1353
+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
+#. type: =head2
+#: ../src/guestfs.pod:1361
+msgid "guestfs_set_error_handler"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1363
+#, 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
+#. type: textblock
+#: ../src/guestfs.pod:1370
+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
+#. type: textblock
+#: ../src/guestfs.pod:1374
+msgid ""
+"C<errno> is not passed to the callback. To get that the callback must call "
+"L</guestfs_last_errno>."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1377
+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
+#. type: textblock
+#: ../src/guestfs.pod:1381
+msgid "The default handler prints messages on C<stderr>."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1383
+msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1385
+msgid "guestfs_get_error_handler"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1387
+#, no-wrap
+msgid ""
+" guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
+" void **opaque_rtn);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1390
+msgid "Returns the current error handler callback."
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1392
+msgid "guestfs_set_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1394
+#, 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
+#. type: textblock
+#: ../src/guestfs.pod:1398
+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
+#. type: textblock
+#: ../src/guestfs.pod:1401
+msgid "The default is to call L<abort(3)>."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1403
+msgid ""
+"You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1406
+msgid "guestfs_get_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1408
+#, no-wrap
+msgid ""
+" guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1410
+msgid "This returns the current out of memory handler."
+msgstr ""
+
+# type: =head1
+#. type: =head1
+#: ../src/guestfs.pod:1412
+msgid "API CALLS"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1414 ../fish/guestfish.pod:958
+msgid "@ACTIONS@"
+msgstr ""
+
+# type: =head1
+#. type: =head1
+#: ../src/guestfs.pod:1416
+msgid "STRUCTURES"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1418
+msgid "@STRUCTS@"
+msgstr ""
+
+# type: =head1
+#. type: =head1
+#: ../src/guestfs.pod:1420
+msgid "AVAILABILITY"
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1422
+msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1424
+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
+#. type: textblock
+#: ../src/guestfs.pod:1429
+msgid "@AVAILABILITY@"
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1431
+msgid "GUESTFISH supported COMMAND"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1433
+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
+#. type: =head2
+#: ../src/guestfs.pod:1438
+msgid "SINGLE CALLS AT COMPILE TIME"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1440
+msgid ""
+"Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
+"function, such as:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1443
+#, no-wrap
+msgid ""
+" #define LIBGUESTFS_HAVE_DD 1\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1445
+msgid "if L</guestfs_dd> is available."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1447
+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
+#. type: verbatim
+#: ../src/guestfs.pod:1452
+#, no-wrap
+msgid ""
+" AC_CHECK_LIB([guestfs],[guestfs_create])\n"
+" AC_CHECK_FUNCS([guestfs_dd])\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1455
+msgid ""
+"which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
+"in your program."
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1458
+msgid "SINGLE CALLS AT RUN TIME"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1460
+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
+#. type: textblock
+#: ../src/guestfs.pod:1467
+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
+#. type: verbatim
+#: ../src/guestfs.pod:1471
+#, 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
+#. type: verbatim
+#: ../src/guestfs.pod:1477
+#, no-wrap
+msgid ""
+" main ()\n"
+" {\n"
+" #ifdef LIBGUESTFS_HAVE_DD\n"
+" void *dl;\n"
+" int has_function;\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1483
+#, no-wrap
+msgid ""
+" /* Test if the function guestfs_dd is really available. */\n"
+" dl = dlopen (NULL, RTLD_LAZY);\n"
+" if (!dl) {\n"
+" fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
+" exit (EXIT_FAILURE);\n"
+" }\n"
+" has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
+" dlclose (dl);\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1492
+#, no-wrap
+msgid ""
+" if (!has_function)\n"
+" printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
+" else {\n"
+" printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
+" /* Now it's safe to call\n"
+" guestfs_dd (g, \"foo\", \"bar\");\n"
+" */\n"
+" }\n"
+" #else\n"
+" printf (\"guestfs_dd function was not found at compile time\\n\");\n"
+" #endif\n"
+" }\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1505
+msgid ""
+"You may think the above is an awful lot of hassle, and it is. There are "
+"other ways outside of the C linking system to ensure that this kind of "
+"incompatibility never arises, such as using package versioning:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1510
+#, no-wrap
+msgid ""
+" Requires: libguestfs >= 1.0.80\n"
+"\n"
+msgstr ""
+
+# type: =head1
+#. type: =head1
+#: ../src/guestfs.pod:1512
+msgid "CALLS WITH OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1514
+msgid ""
+"A recent feature of the API is the introduction of calls which take optional "
+"arguments. In C these are declared 3 ways. The main way is as a call which "
+"takes variable arguments (ie. C<...>), as in this example:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1519
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1521
+msgid ""
+"Call this with a list of optional arguments, terminated by C<-1>. So to "
+"call with no optional arguments specified:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1524
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename, -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1526
+msgid "With a single optional argument:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1528
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename,\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
+" -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1532
+msgid "With two:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1534
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename,\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
+" GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
+" -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1539
+msgid ""
+"and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
+"happen!"
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1542
+msgid "USING va_list FOR OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1544
+msgid ""
+"The second variant has the same name with the suffix C<_va>, which works the "
+"same way but takes a C<va_list>. See the C manual for details. For the "
+"example function, this is declared:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1548
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
+" va_list args);\n"
+"\n"
+msgstr ""
+
+# type: =head2
+#. type: =head2
+#: ../src/guestfs.pod:1551
+msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1553
+msgid ""
+"The third variant is useful where you need to construct these calls. You "
+"pass in a structure where you fill in the optional fields. The structure "
+"has a bitmask as the first element which you must set to indicate which "
+"fields you have filled in. For our example function the structure and call "
+"are declared:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1559
+#, no-wrap
+msgid ""
+" struct guestfs_add_drive_opts_argv {\n"
+" uint64_t bitmask;\n"
+" int readonly;\n"
+" const char *format;\n"
+" /* ... */\n"
+" };\n"
+" int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
+" const struct guestfs_add_drive_opts_argv *optargs);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1568
+msgid "You could call it like this:"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1570
+#, no-wrap
+msgid ""
+" struct guestfs_add_drive_opts_argv optargs = {\n"
+" .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
+" .readonly = 1,\n"
+" .format = \"qcow2\"\n"
+" };\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#. type: verbatim
+#: ../src/guestfs.pod:1577
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1579 ../src/guestfs-actions.pod:11
+#: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9
+#: ../fish/guestfish-actions.pod:1253 ../tools/virt-win-reg.pl:532
+msgid "Notes:"
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1585
+msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
+msgstr ""
+
+# type: textblock
+#. type: textblock
+#: ../src/guestfs.pod:1590
+msgid "You do not need to fill in all fields of the structure."