+# type: textblock
+#: ../src/guestfs.pod:1312
+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:1315
+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:1319
+msgid "The default handler prints messages on C<stderr>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1321
+msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1323
+msgid "guestfs_get_error_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1325
+#, 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:1328
+msgid "Returns the current error handler callback."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1330
+msgid "guestfs_set_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1332
+#, 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:1336
+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:1339
+msgid "The default is to call L<abort(3)>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1341
+msgid ""
+"You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1344
+msgid "guestfs_get_out_of_memory_handler"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1346
+#, no-wrap
+msgid ""
+" guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1348
+msgid "This returns the current out of memory handler."
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1350
+msgid "API CALLS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1352 ../fish/guestfish.pod:907
+msgid "@ACTIONS@"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1354
+msgid "STRUCTURES"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1356
+msgid "@STRUCTS@"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1358
+msgid "AVAILABILITY"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1360
+msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1362
+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:1367
+msgid "@AVAILABILITY@"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1369
+msgid "GUESTFISH supported COMMAND"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1371
+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:1376
+msgid "SINGLE CALLS AT COMPILE TIME"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1378
+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:1381
+#, no-wrap
+msgid ""
+" #define LIBGUESTFS_HAVE_DD 1\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1383
+msgid "if L</guestfs_dd> is available."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1385
+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:1390
+#, no-wrap
+msgid ""
+" AC_CHECK_LIB([guestfs],[guestfs_create])\n"
+" AC_CHECK_FUNCS([guestfs_dd])\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1393
+msgid ""
+"which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
+"in your program."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1396
+msgid "SINGLE CALLS AT RUN TIME"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1398
+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:1405
+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:1409
+#, 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:1415
+#, no-wrap
+msgid ""
+" main ()\n"
+" {\n"
+" #ifdef LIBGUESTFS_HAVE_DD\n"
+" void *dl;\n"
+" int has_function;\n"
+" \n"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1421
+#, 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
+#: ../src/guestfs.pod:1430
+#, 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
+#: ../src/guestfs.pod:1443
+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
+#: ../src/guestfs.pod:1448
+#, no-wrap
+msgid ""
+" Requires: libguestfs >= 1.0.80\n"
+"\n"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1450
+msgid "CALLS WITH OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1452
+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
+#: ../src/guestfs.pod:1457
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1459
+msgid ""
+"Call this with a list of optional arguments, terminated by C<-1>. So to "
+"call with no optional arguments specified:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1462
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename, -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1464
+msgid "With a single optional argument:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1466
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename,\n"
+" GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
+" -1);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1470
+msgid "With two:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1472
+#, 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
+#: ../src/guestfs.pod:1477
+msgid ""
+"and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
+"happen!"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1480
+msgid "USING va_list FOR OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1482
+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
+#: ../src/guestfs.pod:1486
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
+" va_list args);\n"
+"\n"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1489
+msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1491
+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
+#: ../src/guestfs.pod:1497
+#, 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
+#: ../src/guestfs.pod:1506
+msgid "You could call it like this:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1508
+#, 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
+#: ../src/guestfs.pod:1515
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1517 ../src/guestfs-actions.pod:11
+#: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9
+#: ../fish/guestfish-actions.pod:1255
+msgid "Notes:"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1523
+msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1528
+msgid "You do not need to fill in all fields of the structure."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1532
+msgid ""
+"There must be a one-to-one correspondence between fields of the structure "
+"that are filled in, and bits set in the bitmask."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1537
+msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1539
+msgid ""
+"In other languages, optional arguments are expressed in the way that is "
+"natural for that language. We refer you to the language-specific "
+"documentation for more details on that."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1543
+msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1545
+msgid "SETTING CALLBACKS TO HANDLE EVENTS"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1547
+msgid ""
+"The child process generates events in some situations. Current events "
+"include: receiving a log message, the child process exits."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1550
+msgid ""
+"Use the C<guestfs_set_*_callback> functions to set a callback for different "
+"types of events."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1553
+msgid ""
+"Only I<one callback of each type> can be registered for each handle. "
+"Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
+"that type. Cancel all callbacks of this type by calling this function with "
+"C<cb> set to C<NULL>."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1558
+msgid "guestfs_set_log_message_callback"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1560
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
+" char *buf, int len);\n"
+" void guestfs_set_log_message_callback (guestfs_h *g,\n"
+" guestfs_log_message_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1566
+msgid ""
+"The callback function C<cb> will be called whenever qemu or the guest writes "
+"anything to the console."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1569
+msgid "Use this function to capture kernel messages and similar."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1571
+msgid ""
+"Normally there is no log message handler, and log messages are just "
+"discarded."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1574
+msgid "guestfs_set_subprocess_quit_callback"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1576
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
+" void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
+" guestfs_subprocess_quit_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1581
+msgid ""
+"The callback function C<cb> will be called when the child process quits, "
+"either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
+"corresponds to a transition from any state to the CONFIG state)."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1586
+msgid "guestfs_set_launch_done_callback"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1588
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
+" void guestfs_set_launch_done_callback (guestfs_h *g,\n"
+" guestfs_launch_done_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1593
+msgid ""
+"The callback function C<cb> will be called when the child process becomes "
+"ready first time after it has been launched. (This corresponds to a "
+"transition from LAUNCHING to the READY state)."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1597
+msgid "guestfs_set_close_callback"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1599
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
+" void guestfs_set_close_callback (guestfs_h *g,\n"
+" guestfs_close_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1604
+msgid ""
+"The callback function C<cb> will be called while the handle is being closed "
+"(synchronously from L</guestfs_close>)."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1607
+msgid ""
+"Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
+"handles that are open when the program exits. This means that this callback "
+"might be called indirectly from L<exit(3)>, which can cause unexpected "
+"problems in higher-level languages (eg. if your HLL interpreter has already "
+"been cleaned up by the time this is called, and if your callback then jumps "
+"into some HLL function)."
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1615
+msgid "guestfs_set_progress_callback"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1617
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
+" int proc_nr, int serial,\n"
+" uint64_t position, uint64_t total);\n"
+" void guestfs_set_progress_callback (guestfs_h *g,\n"
+" guestfs_progress_cb cb,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1624
+msgid ""
+"Some long-running operations can generate progress messages. If this "
+"callback is registered, then it will be called each time a progress message "
+"is generated (usually two seconds after the operation started, and three "
+"times per second thereafter until it completes, although the frequency may "
+"change in future versions)."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1630
+msgid ""
+"The callback receives two numbers: C<position> and C<total>. The units of "
+"C<total> are not defined, although for some operations C<total> may relate "
+"in some way to the amount of data to be transferred (eg. in bytes or "
+"megabytes), and C<position> may be the portion which has been transferred."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1636
+msgid "The only defined and stable parts of the API are:"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1642
+msgid ""
+"The callback can display to the user some type of progress bar or indicator "
+"which shows the ratio of C<position>:C<total>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1647
+msgid "0 E<lt>= C<position> E<lt>= C<total>"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1651
+msgid ""
+"If any progress notification is sent during a call, then a final progress "
+"notification is always sent when C<position> = C<total>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1654
+msgid ""
+"This is to simplify caller code, so callers can easily set the progress "
+"indicator to \"100%\" at the end of the operation, without requiring special "
+"code to detect this case."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1660
+msgid ""
+"The callback also receives the procedure number and serial number of the "
+"call. These are only useful for debugging protocol issues, and the callback "
+"can normally ignore them. The callback may want to print these numbers in "
+"error messages or debugging messages."
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1665
+msgid "PRIVATE DATA AREA"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1667
+msgid ""
+"You can attach named pieces of private data to the libguestfs handle, and "
+"fetch them by name for the lifetime of the handle. This is called the "
+"private data area and is only available from the C API."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1671
+msgid "To attach a named piece of data, use the following call:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1673
+#, no-wrap
+msgid ""
+" void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1675
+msgid ""
+"C<key> is the name to associate with this data, and C<data> is an arbitrary "
+"pointer (which can be C<NULL>). Any previous item with the same name is "
+"overwritten."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1679
+msgid ""
+"You can use any C<key> you want, but names beginning with an underscore "
+"character are reserved for internal libguestfs purposes (for implementing "
+"language bindings). It is recommended to prefix the name with some unique "
+"string to avoid collisions with other users."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1684
+msgid "To retrieve the pointer, use:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1686
+#, no-wrap
+msgid ""
+" void *guestfs_get_private (guestfs_h *g, const char *key);\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1688
+msgid ""
+"This function returns C<NULL> if either no data is found associated with "
+"C<key>, or if the user previously set the C<key>'s C<data> pointer to "
+"C<NULL>."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1692
+msgid ""
+"Libguestfs does not try to look at or interpret the C<data> pointer in any "
+"way. As far as libguestfs is concerned, it need not be a valid pointer at "
+"all. In particular, libguestfs does I<not> try to free the data when the "
+"handle is closed. If the data must be freed, then the caller must either "
+"free it before calling L</guestfs_close> or must set up a close callback to "
+"do it (see L</guestfs_set_close_callback>, and note that only one callback "
+"can be registered for a handle)."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1700
+msgid ""
+"The private data area is implemented using a hash table, and should be "
+"reasonably efficient for moderate numbers of keys."
+msgstr ""
+
+# type: =end
+#: ../src/guestfs.pod:1703 ../src/guestfs.pod:1708
+msgid "html"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1705
+msgid ""
+"<!-- old anchor for the next section --> <a name="
+"\"state_machine_and_low_level_event_api\"/>"
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1710
+msgid "ARCHITECTURE"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1712
+msgid ""
+"Internally, libguestfs is implemented by running an appliance (a special "
+"type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
+"process of the main program."
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1716
+#, no-wrap
+msgid ""
+" ___________________\n"
+" / \\\n"
+" | main program |\n"
+" | |\n"
+" | | child process / appliance\n"
+" | | __________________________\n"
+" | | / qemu \\\n"
+" +-------------------+ RPC | +-----------------+ |\n"
+" | libguestfs <--------------------> guestfsd | |\n"
+" | | | +-----------------+ |\n"
+" \\___________________/ | | Linux kernel | |\n"
+" | +--^--------------+ |\n"
+" \\_________|________________/\n"
+" |\n"
+" _______v______\n"
+" / \\\n"
+" | Device or |\n"
+" | disk image |\n"
+" \\______________/\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1736
+msgid ""
+"The library, linked to the main program, creates the child process and hence "
+"the appliance in the L</guestfs_launch> function."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1739
+msgid ""
+"Inside the appliance is a Linux kernel and a complete stack of userspace "
+"tools (such as LVM and ext2 programs) and a small controlling daemon called "
+"L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
+"calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
+"API calls and RPC calls to the daemon. Lastly the disk image(s) are "
+"attached to the qemu process which translates device access by the "
+"appliance's Linux kernel into accesses to the image."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1748
+msgid ""
+"A common misunderstanding is that the appliance \"is\" the virtual machine. "
+"Although the disk image you are attached to might also be used by some "
+"virtual machine, libguestfs doesn't know or care about this. (But you will "
+"care if both libguestfs's qemu process and your virtual machine are trying "
+"to update the disk image at the same time, since these usually results in "
+"massive disk corruption)."
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1755
+msgid "STATE MACHINE"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1757
+msgid "libguestfs uses a state machine to model the child process:"
+msgstr ""
+
+# type: verbatim
+#: ../src/guestfs.pod:1759
+#, no-wrap
+msgid ""
+" |\n"
+" guestfs_create\n"
+" |\n"
+" |\n"
+" ____V_____\n"
+" / \\\n"
+" | CONFIG |\n"
+" \\__________/\n"
+" ^ ^ ^ \\\n"
+" / | \\ \\ guestfs_launch\n"
+" / | _\\__V______\n"
+" / | / \\\n"
+" / | | LAUNCHING |\n"
+" / | \\___________/\n"
+" / | /\n"
+" / | guestfs_launch\n"
+" / | /\n"
+" ______ / __|____V\n"
+" / \\ ------> / \\\n"
+" | BUSY | | READY |\n"
+" \\______/ <------ \\________/\n"
+"\n"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1781
+msgid ""
+"The normal transitions are (1) CONFIG (when the handle is created, but there "
+"is no child process), (2) LAUNCHING (when the child process is booting up), "
+"(3) alternating between READY and BUSY as commands are issued to, and "
+"carried out by, the child process."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1786
+msgid ""
+"The guest may be killed by L</guestfs_kill_subprocess>, or may die "
+"asynchronously at any time (eg. due to some internal error), and that causes "
+"the state to transition back to CONFIG."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1790
+msgid ""
+"Configuration commands for qemu such as L</guestfs_add_drive> can only be "
+"issued when in the CONFIG state."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1793
+msgid ""
+"The API offers one call that goes from CONFIG through LAUNCHING to READY. "
+"L</guestfs_launch> blocks until the child process is READY to accept "
+"commands (or until some failure or timeout). L</guestfs_launch> internally "
+"moves the state from CONFIG to LAUNCHING while it is running."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1799
+msgid ""
+"API actions such as L</guestfs_mount> can only be issued when in the READY "
+"state. These API calls block waiting for the command to be carried out (ie. "
+"the state to transition to BUSY and then back to READY). There are no non-"
+"blocking versions, and no way to issue more than one command per handle at "
+"the same time."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1805
+msgid ""
+"Finally, the child process sends asynchronous messages back to the main "
+"program, such as kernel log messages. You can register a callback to "
+"receive these messages."
+msgstr ""
+
+# type: =head1
+#: ../src/guestfs.pod:1809
+msgid "INTERNALS"
+msgstr ""
+
+# type: =head2
+#: ../src/guestfs.pod:1811
+msgid "COMMUNICATION PROTOCOL"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1813
+msgid ""
+"Don't rely on using this protocol directly. This section documents how it "
+"currently works, but it may change at any time."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1816
+msgid ""
+"The protocol used to talk between the library and the daemon running inside "
+"the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
+"1014, RFC 1832, RFC 4506)."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1820
+msgid ""
+"The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
+"this file is automatically generated)."
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1823
+msgid ""
+"There are two broad cases, ordinary functions that don't have any C<FileIn> "
+"and C<FileOut> parameters, which are handled with very simple request/reply "
+"messages. Then there are functions that have any C<FileIn> or C<FileOut> "
+"parameters, which use the same request and reply messages, but they may also "
+"be followed by files sent using a chunked encoding."
+msgstr ""
+
+# type: =head3
+#: ../src/guestfs.pod:1830
+msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
+msgstr ""
+
+# type: textblock
+#: ../src/guestfs.pod:1832
+msgid "For ordinary functions, the request message is:"