+#. type: =head1
+#: ../src/guestfs.pod:1226
+msgid "CONNECTION MANAGEMENT"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1228
+msgid "guestfs_h *"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1230
+msgid ""
+"C<guestfs_h> is the opaque type representing a connection handle. Create a "
+"handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
+"handle and release all resources used."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1234
+msgid ""
+"For information on using multiple handles and threads, see the section "
+"L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1237
+msgid "guestfs_create"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1239
+#, no-wrap
+msgid ""
+" guestfs_h *guestfs_create (void);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1241
+msgid "Create a connection handle."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1243
+msgid ""
+"You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
+"on the handle at least once."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1246
+msgid ""
+"This function returns a non-NULL pointer to a handle on success or NULL on "
+"error."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1249
+msgid "After configuring the handle, you have to call L</guestfs_launch>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1251
+msgid ""
+"You may also want to configure error handling for the handle. See L</ERROR "
+"HANDLING> section below."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1254
+msgid "guestfs_close"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1256
+#, no-wrap
+msgid ""
+" void guestfs_close (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1258
+msgid "This closes the connection handle and frees up all resources used."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1260
+msgid "ERROR HANDLING"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1262
+msgid ""
+"API functions can return errors. For example, almost all functions that "
+"return C<int> will return C<-1> to indicate an error."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1265
+msgid ""
+"Additional information is available for errors: an error message string and "
+"optionally an error number (errno) if the thing that failed was a system "
+"call."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1269
+msgid ""
+"You can get at the additional information about the last error on the handle "
+"by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
+"up an error handler with L</guestfs_set_error_handler>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1274
+msgid ""
+"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:1278
+#, no-wrap
+msgid ""
+" if (guestfs_launch (g) == -1)\n"
+" exit (EXIT_FAILURE);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1281
+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:1284
+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:1287
+#, no-wrap
+msgid ""
+" g = guestfs_create ();\n"
+" \n"
+msgstr ""
+
+#. 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
+#: ../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
+#: ../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
+#: ../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
+#: ../src/guestfs.pod:1311
+msgid "guestfs_last_error"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1313
+#, no-wrap
+msgid ""
+" const char *guestfs_last_error (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+#. 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
+#: ../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
+#: ../src/guestfs.pod:1322
+msgid "guestfs_last_errno"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1324
+#, no-wrap
+msgid ""
+" int guestfs_last_errno (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1326
+msgid "This returns the last error number (errno) that happened on C<g>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1328
+msgid "If successful, an errno integer not equal to zero is returned."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1330
+msgid "If no error, this returns 0. This call can return 0 in three situations:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1337
+msgid "There has not been any error on the handle."
+msgstr ""
+
+#. 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
+#: ../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
+#: ../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
+#: ../src/guestfs.pod:1361
+msgid "guestfs_set_error_handler"
+msgstr ""
+
+#. 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
+#: ../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
+#: ../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
+#: ../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
+#: ../src/guestfs.pod:1381
+msgid "The default handler prints messages on C<stderr>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1383
+msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1385
+msgid "guestfs_get_error_handler"
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1390
+msgid "Returns the current error handler callback."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1392
+msgid "guestfs_set_out_of_memory_handler"
+msgstr ""
+
+#. 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
+#: ../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
+#: ../src/guestfs.pod:1401
+msgid "The default is to call L<abort(3)>."
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1406
+msgid "guestfs_get_out_of_memory_handler"
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1410
+msgid "This returns the current out of memory handler."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1412
+msgid "API CALLS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1414 ../fish/guestfish.pod:958
+msgid "@ACTIONS@"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1416
+msgid "STRUCTURES"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1418
+msgid "@STRUCTS@"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1420
+msgid "AVAILABILITY"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1422
+msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1429
+msgid "@AVAILABILITY@"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1431
+msgid "GUESTFISH supported COMMAND"
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1438
+msgid "SINGLE CALLS AT COMPILE TIME"
+msgstr ""
+
+#. 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
+#: ../src/guestfs.pod:1443
+#, no-wrap
+msgid ""
+" #define LIBGUESTFS_HAVE_DD 1\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1445