+" 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:1446
+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:1450
+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:1453
+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:1457
+msgid "The default handler prints messages on C<stderr>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1459
+msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1461
+msgid "guestfs_get_error_handler"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1463
+#, 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:1466
+msgid "Returns the current error handler callback."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1468
+msgid "guestfs_set_out_of_memory_handler"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1470
+#, 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:1474
+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:1477
+msgid "The default is to call L<abort(3)>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1479
+msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1482
+msgid "guestfs_get_out_of_memory_handler"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1484
+#, no-wrap
+msgid ""
+" guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1486
+msgid "This returns the current out of memory handler."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1488
+msgid "API CALLS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1490 ../fish/guestfish.pod:1008
+msgid "@ACTIONS@"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1492
+msgid "STRUCTURES"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1494
+msgid "@STRUCTS@"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1496
+msgid "AVAILABILITY"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1498
+msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1500
+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:1505
+msgid "@AVAILABILITY@"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1507
+msgid "GUESTFISH supported COMMAND"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1509
+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:1514
+msgid "SINGLE CALLS AT COMPILE TIME"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1516
+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:1519
+#, no-wrap
+msgid ""
+" #define LIBGUESTFS_HAVE_DD 1\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1521
+msgid "if L</guestfs_dd> is available."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1523
+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:1528
+#, no-wrap
+msgid ""
+" AC_CHECK_LIB([guestfs],[guestfs_create])\n"
+" AC_CHECK_FUNCS([guestfs_dd])\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1531
+msgid ""
+"which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
+"in your program."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1534
+msgid "SINGLE CALLS AT RUN TIME"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1536
+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:1543
+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:1547
+#, 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:1553
+#, 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:1559
+#, 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:1568
+#, 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:1581
+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:1586
+#, no-wrap
+msgid ""
+" Requires: libguestfs >= 1.0.80\n"
+"\n"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1588
+msgid "CALLS WITH OPTIONAL ARGUMENTS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1590
+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:1595
+#, no-wrap
+msgid ""
+" int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1597
+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:1600
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts (g, filename, -1);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1602
+msgid "With a single optional argument:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1604
+#, 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:1608
+msgid "With two:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1610
+#, 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:1615
+msgid ""
+"and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
+"happen!"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1618
+msgid "USING va_list FOR OPTIONAL ARGUMENTS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1620
+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:1624
+#, 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:1627
+msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1629
+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:1635
+#, 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:1644
+msgid "You could call it like this:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1646
+#, 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:1653
+#, no-wrap
+msgid ""
+" guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1655 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1260 ../tools/virt-win-reg.pl:532
+msgid "Notes:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1661
+msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1666
+msgid "You do not need to fill in all fields of the structure."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1670
+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:1675
+msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1677
+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:1681
+msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:1683
+msgid "SETTING CALLBACKS TO HANDLE EVENTS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1685
+msgid ""
+"B<Note:> This section documents the generic event mechanism introduced in "
+"libguestfs 1.10, which you should use in new code if possible. The old "
+"functions C<guestfs_set_log_message_callback>, "
+"C<guestfs_set_subprocess_quit_callback>, "
+"C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
+"C<guestfs_set_progress_callback> are no longer documented in this manual "
+"page."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1693
+msgid ""
+"Handles generate events when certain things happen, such as log messages "
+"being generated, progress messages during long-running operations, or the "
+"handle being closed. The API calls described below let you register a "
+"callback to be called when events happen. You can register multiple "
+"callbacks (for the same, different or overlapping sets of events), and "
+"individually remove callbacks. If callbacks are not removed, then they "
+"remain in force until the handle is closed."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1701
+msgid ""
+"In the current implementation, events are only generated synchronously: that "
+"means that events (and hence callbacks) can only happen while you are in the "
+"middle of making another libguestfs call. The callback is called in the "
+"same thread."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1706
+msgid ""
+"Events may contain a payload, usually nothing (void), an array of 64 bit "
+"unsigned integers, or a message buffer. Payloads are discussed later on."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:1710
+msgid "CLASSES OF EVENTS"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1714
+msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1717
+msgid ""
+"The callback function will be called while the handle is being closed "
+"(synchronously from L</guestfs_close>)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1720
+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: textblock
+#: ../src/guestfs.pod:1727
+msgid ""
+"If no callback is registered: the handle is closed without any callback "
+"being invoked."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1730
+msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1733
+msgid ""
+"The callback function 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: textblock
+#: ../src/guestfs.pod:1737 ../src/guestfs.pod:1746
+msgid "If no callback is registered: the event is ignored."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1739
+msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1742
+msgid ""
+"The callback function 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: =item
+#: ../src/guestfs.pod:1748
+msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1751
+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:1757
+msgid ""
+"The callback receives in the payload four unsigned 64 bit numbers which are "
+"(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1760
+msgid ""
+"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:1765
+msgid "The only defined and stable parts of the API are:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1771
+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:1776
+msgid "0 E<lt>= C<position> E<lt>= C<total>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1780
+msgid ""
+"If any progress notification is sent during a call, then a final progress "
+"notification is always sent when C<position> = C<total> (I<unless> the call "
+"fails with an error)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1784
+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:1790
+msgid ""
+"For some calls we are unable to estimate the progress of the call, but we "
+"can still generate progress messages to indicate activity. This is known as "
+"\"pulse mode\", and is directly supported by certain progress bar "
+"implementations (eg. GtkProgressBar)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1795
+msgid ""
+"For these calls, zero or more progress messages are generated with "
+"C<position = 0> and C<total = 1>, followed by a final message with "
+"C<position = total = 1>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1799
+msgid ""
+"As noted above, if the call fails with an error then the final message may "
+"not be generated."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1804
+msgid ""
+"The callback also receives the procedure number (C<proc_nr>) and serial "
+"number (C<serial>) 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: textblock
+#: ../src/guestfs.pod:1810
+msgid "If no callback is registered: progress messages are discarded."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1812
+msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1815
+msgid ""
+"The callback function is called whenever a log message is generated by qemu, "
+"the appliance kernel, guestfsd (daemon), or utility programs."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1818
+msgid ""
+"If the verbose flag (L</guestfs_set_verbose>) is set before launch "
+"(L</guestfs_launch>) then additional debug messages are generated."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1821 ../src/guestfs.pod:1835
+msgid ""
+"If no callback is registered: the messages are discarded unless the verbose "
+"flag is set in which case they are sent to stderr. You can override the "
+"printing of verbose messages to stderr by setting up a callback."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1826
+msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1829
+msgid ""
+"The callback function is called whenever a log message is generated by the "
+"library part of libguestfs."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1832
+msgid ""
+"If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
+"messages are generated."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:1840
+msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1843
+msgid ""
+"The callback function is called whenever a trace message is generated. This "
+"only applies if the trace flag (L</guestfs_set_trace>) is set."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1846
+msgid ""
+"If no callback is registered: the messages are sent to stderr. You can "
+"override the printing of trace messages to stderr by setting up a callback."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:1852
+msgid "guestfs_set_event_callback"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1854
+#, no-wrap
+msgid ""
+" int guestfs_set_event_callback (guestfs_h *g,\n"
+" guestfs_event_callback cb,\n"
+" uint64_t event_bitmask,\n"
+" int flags,\n"
+" void *opaque);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1860
+msgid ""
+"This function registers a callback (C<cb>) for all event classes in the "
+"C<event_bitmask>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1863
+msgid ""
+"For example, to register for all log message events, you could call this "
+"function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
+"To register a single callback for all possible classes of events, use "
+"C<GUESTFS_EVENT_ALL>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1869
+msgid "C<flags> should always be passed as 0."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1871
+msgid ""
+"C<opaque> is an opaque pointer which is passed to the callback. You can use "
+"it for any purpose."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1874
+msgid ""
+"The return value is the event handle (an integer) which you can use to "
+"delete the callback (see below)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1877
+msgid ""
+"If there is an error, this function returns C<-1>, and sets the error in the "
+"handle in the usual way (see L</guestfs_last_error> etc.)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1880
+msgid ""
+"Callbacks remain in effect until they are deleted, or until the handle is "
+"closed."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1883
+msgid ""
+"In the case where multiple callbacks are registered for a particular event "
+"class, all of the callbacks are called. The order in which multiple "
+"callbacks are called is not defined."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:1887
+msgid "guestfs_delete_event_callback"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1889
+#, no-wrap
+msgid ""
+" void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1891
+msgid ""
+"Delete a callback that was previously registered. C<event_handle> should be "
+"the integer that was returned by a previous call to "
+"C<guestfs_set_event_callback> on the same handle."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:1895
+msgid "guestfs_event_callback"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1897
+#, no-wrap
+msgid ""
+" typedef void (*guestfs_event_callback) (\n"
+" guestfs_h *g,\n"
+" void *opaque,\n"
+" uint64_t event,\n"
+" int event_handle,\n"
+" int flags,\n"
+" const char *buf, size_t buf_len,\n"
+" const uint64_t *array, size_t array_len);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1906
+msgid "This is the type of the event callback function that you have to provide."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1909
+msgid ""
+"The basic parameters are: the handle (C<g>), the opaque user pointer "
+"(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
+"handle, and C<flags> which in the current API you should ignore."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1913
+msgid ""
+"The remaining parameters contain the event payload (if any). Each event may "
+"contain a payload, which usually relates to the event class, but for future "
+"proofing your code should be written to handle any payload for any event "
+"class."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1918
+msgid ""
+"C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
+"there is no message buffer). Note that this message buffer can contain "
+"arbitrary 8 bit data, including NUL bytes."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1922
+msgid ""
+"C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
+"moment this is only used for progress messages."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:1925
+msgid "EXAMPLE: CAPTURING LOG MESSAGES"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1927
+msgid ""
+"One motivation for the generic event API was to allow GUI programs to "
+"capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
+"unconditionally to C<stderr>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1931
+msgid ""
+"Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
+"C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
+"messages are not events; you must capture error messages separately)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1936
+msgid ""
+"Programs have to set up a callback to capture the classes of events of "
+"interest:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1939
+#, no-wrap
+msgid ""
+" int eh =\n"
+" guestfs_set_event_callback\n"
+" (g, message_callback,\n"
+" GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
+" GUESTFS_EVENT_TRACE,\n"
+" 0, NULL) == -1)\n"
+" if (eh == -1) {\n"
+" // handle error in the usual way\n"
+" }\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1949
+msgid ""
+"The callback can then direct messages to the appropriate place. In this "
+"example, messages are directed to syslog:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1952
+#, no-wrap
+msgid ""
+" static void\n"
+" message_callback (\n"
+" guestfs_h *g,\n"
+" void *opaque,\n"
+" uint64_t event,\n"
+" int event_handle,\n"
+" int flags,\n"
+" const char *buf, size_t buf_len,\n"
+" const uint64_t *array, size_t array_len)\n"
+" {\n"
+" const int priority = LOG_USER|LOG_INFO;\n"
+" if (buf_len > 0)\n"
+" syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
+" }\n"
+"\n"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:1967
+msgid "PRIVATE DATA AREA"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1969
+msgid ""
+"You can attach named pieces of private data to the libguestfs handle, fetch "
+"them by name, and walk over them, 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:1974
+msgid "To attach a named piece of data, use the following call:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1976
+#, no-wrap
+msgid ""
+" void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1978
+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:1982
+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:1987
+msgid "To retrieve the pointer, use:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:1989
+#, no-wrap
+msgid ""
+" void *guestfs_get_private (guestfs_h *g, const char *key);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:1991
+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:1995
+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_EVENT_CLOSE>)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2002
+msgid "To walk over all entries, use these two functions:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2004
+#, no-wrap
+msgid ""
+" void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
+"\n"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2006
+#, no-wrap
+msgid ""
+" void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2008
+msgid ""
+"C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
+"not have any particular meaning -- keys are not returned in any defined "
+"order). A pointer to the key is returned in C<*key_rtn> and the "
+"corresponding data pointer is returned from the function. C<NULL> is "
+"returned if there are no keys stored in the handle."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2014
+msgid ""
+"C<guestfs_next_private> returns the next key, pointer pair. The return "
+"value of this function is also C<NULL> is there are no further entries to "
+"return."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2018
+msgid "Notes about walking over entries:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2024
+msgid "You must not call C<guestfs_set_private> while walking over the entries."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2029
+msgid ""
+"The handle maintains an internal iterator which is reset when you call "
+"C<guestfs_first_private>. This internal iterator is invalidated when you "
+"call C<guestfs_set_private>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2035
+msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2037
+#, no-wrap
+msgid ""
+" guestfs_set_private (g, key, NULL);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2039
+msgid "then that C<key> is not returned when walking."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2043
+msgid ""
+"C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
+"C<guestfs_next_private> or C<guestfs_set_private>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2049
+msgid ""
+"The following example code shows how to print all keys and data pointers "
+"that are associated with the handle C<g>:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2052
+#, no-wrap
+msgid ""
+" const char *key;\n"
+" void *data = guestfs_first_private (g, &key);\n"
+" while (data != NULL)\n"
+" {\n"
+" printf (\"key = %s, data = %p\\n\", key, data);\n"
+" data = guestfs_next_private (g, &key);\n"
+" }\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2060
+msgid ""
+"More commonly you are only interested in keys that begin with an "
+"application-specific prefix C<foo_>. Modify the loop like so:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2063
+#, no-wrap
+msgid ""
+" const char *key;\n"
+" void *data = guestfs_first_private (g, &key);\n"
+" while (data != NULL)\n"
+" {\n"
+" if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
+" printf (\"key = %s, data = %p\\n\", key, data);\n"
+" data = guestfs_next_private (g, &key);\n"
+" }\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2072
+msgid ""
+"If you need to modify keys while walking, then you have to jump back to the "
+"beginning of the loop. For example, to delete all keys prefixed with "
+"C<foo_>:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2076
+#, no-wrap
+msgid ""
+" const char *key;\n"
+" void *data;\n"
+" again:\n"
+" data = guestfs_first_private (g, &key);\n"
+" while (data != NULL)\n"
+" {\n"
+" if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
+" {\n"
+" guestfs_set_private (g, key, NULL);\n"
+" /* note that 'key' pointer is now invalid, and so is\n"
+" the internal iterator */\n"
+" goto again;\n"
+" }\n"
+" data = guestfs_next_private (g, &key);\n"
+" }\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2092
+msgid ""
+"Note that the above loop is guaranteed to terminate because the keys are "
+"being deleted, but other manipulations of keys within the loop might not "
+"terminate unless you also maintain an indication of which keys have been "
+"visited."
+msgstr ""
+
+#. type: =end
+#: ../src/guestfs.pod:2097 ../src/guestfs.pod:2102
+msgid "html"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2099
+msgid ""
+"<!-- old anchor for the next section --> <a "
+"name=\"state_machine_and_low_level_event_api\"/>"
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:2104
+msgid "ARCHITECTURE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2106
+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:2110
+#, 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:2130
+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:2133
+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:2142
+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:2149
+msgid "STATE MACHINE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2151
+msgid "libguestfs uses a state machine to model the child process:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2153
+#, 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:2175
+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:2180
+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:2184
+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:2187
+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:2193
+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:2199
+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:2203
+msgid "INTERNALS"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2205
+msgid "COMMUNICATION PROTOCOL"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2207
+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:2210
+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:2214
+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:2217
+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:2224
+msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2226
+msgid "For ordinary functions, the request message is:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2228
+#, no-wrap
+msgid ""
+" total length (header + arguments,\n"
+" but not including the length word itself)\n"
+" struct guestfs_message_header (encoded as XDR)\n"
+" struct guestfs_<foo>_args (encoded as XDR)\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2233
+msgid ""
+"The total length field allows the daemon to allocate a fixed size buffer "
+"into which it slurps the rest of the message. As a result, the total length "
+"is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
+"effective size of any request is limited to somewhere under this size."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2239
+msgid ""
+"Note also that many functions don't take any arguments, in which case the "
+"C<guestfs_I<foo>_args> is completely omitted."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2242
+msgid ""
+"The header contains the procedure number (C<guestfs_proc>) which is how the "
+"receiver knows what type of args structure to expect, or none at all."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2246
+msgid ""
+"For functions that take optional arguments, the optional arguments are "
+"encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
+"arguments. A bitmask in the header indicates which optional arguments are "
+"meaningful. The bitmask is also checked to see if it contains bits set "
+"which the daemon does not know about (eg. if more optional arguments were "
+"added in a later version of the library), and this causes the call to be "
+"rejected."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2254
+msgid "The reply message for ordinary functions is:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2256
+#, no-wrap
+msgid ""
+" total length (header + ret,\n"
+" but not including the length word itself)\n"
+" struct guestfs_message_header (encoded as XDR)\n"
+" struct guestfs_<foo>_ret (encoded as XDR)\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2261
+msgid ""
+"As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
+"functions that return no formal return values."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2264
+msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2267
+msgid ""
+"In the case of an error, a flag is set in the header, and the reply message "
+"is slightly changed:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2270
+#, no-wrap
+msgid ""
+" total length (header + error,\n"
+" but not including the length word itself)\n"
+" struct guestfs_message_header (encoded as XDR)\n"
+" struct guestfs_message_error (encoded as XDR)\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2275
+msgid ""
+"The C<guestfs_message_error> structure contains the error message as a "
+"string."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:2278
+msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2280
+msgid ""
+"A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
+"The normal request message is sent (see above). However this is followed by "
+"a sequence of file chunks."
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2284
+#, no-wrap
+msgid ""
+" total length (header + arguments,\n"
+" but not including the length word itself,\n"
+" and not including the chunks)\n"
+" struct guestfs_message_header (encoded as XDR)\n"
+" struct guestfs_<foo>_args (encoded as XDR)\n"
+" sequence of chunks for FileIn param #0\n"
+" sequence of chunks for FileIn param #1 etc.\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2292
+msgid "The \"sequence of chunks\" is:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2294
+#, no-wrap
+msgid ""
+" length of chunk (not including length word itself)\n"
+" struct guestfs_chunk (encoded as XDR)\n"
+" length of chunk\n"
+" struct guestfs_chunk (encoded as XDR)\n"
+" ...\n"
+" length of chunk\n"
+" struct guestfs_chunk (with data.data_len == 0)\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2302
+msgid ""
+"The final chunk has the C<data_len> field set to zero. Additionally a flag "
+"is set in the final chunk to indicate either successful completion or early "
+"cancellation."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2306
+msgid ""
+"At time of writing there are no functions that have more than one FileIn "
+"parameter. However this is (theoretically) supported, by sending the "
+"sequence of chunks for each FileIn parameter one after another (from left to "
+"right)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2311
+msgid ""
+"Both the library (sender) I<and> the daemon (receiver) may cancel the "
+"transfer. The library does this by sending a chunk with a special flag set "
+"to indicate cancellation. When the daemon sees this, it cancels the whole "
+"RPC, does I<not> send any reply, and goes back to reading the next request."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2317
+msgid ""
+"The daemon may also cancel. It does this by writing a special word "
+"C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
+"the transfer, and if it gets it, it will cancel the transfer (it sends a "
+"cancel chunk). The special word is chosen so that even if cancellation "
+"happens right at the end of the transfer (after the library has finished "
+"writing and has started listening for the reply), the \"spurious\" cancel "
+"flag will not be confused with the reply message."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2326
+msgid ""
+"This protocol allows the transfer of arbitrary sized files (no 32 bit "
+"limit), and also files where the size is not known in advance (eg. from "
+"pipes or sockets). However the chunks are rather small "
+"(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
+"to keep much in memory."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:2332
+msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2334
+msgid ""
+"The protocol for FileOut parameters is exactly the same as for FileIn "
+"parameters, but with the roles of daemon and library reversed."
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2337
+#, no-wrap
+msgid ""
+" total length (header + ret,\n"
+" but not including the length word itself,\n"
+" and not including the chunks)\n"
+" struct guestfs_message_header (encoded as XDR)\n"
+" struct guestfs_<foo>_ret (encoded as XDR)\n"
+" sequence of chunks for FileOut param #0\n"
+" sequence of chunks for FileOut param #1 etc.\n"
+"\n"
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:2345
+msgid "INITIAL MESSAGE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2347
+msgid ""
+"When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
+"which indicates that the guest and daemon is alive. This is what "
+"L</guestfs_launch> waits for."
+msgstr ""
+
+#. type: =head3
+#: ../src/guestfs.pod:2351
+msgid "PROGRESS NOTIFICATION MESSAGES"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2353
+msgid ""
+"The daemon may send progress notification messages at any time. These are "
+"distinguished by the normal length word being replaced by "
+"C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2357
+msgid ""
+"The library turns them into progress callbacks (see "
+"L</GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards "
+"them if not."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2361
+msgid ""
+"The daemon self-limits the frequency of progress messages it sends (see "
+"C<daemon/proto.c:notify_progress>). Not all calls generate progress "
+"messages."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:2365
+msgid "LIBGUESTFS VERSION NUMBERS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2367
+msgid ""
+"Since April 2010, libguestfs has started to make separate development and "
+"stable releases, along with corresponding branches in our git repository. "
+"These separate releases can be identified by version number:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2372
+#, no-wrap
+msgid ""
+" even numbers for stable: 1.2.x, 1.4.x, ...\n"
+" .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
+" |\n"
+" v\n"
+" 1 . 3 . 5\n"
+" ^ ^\n"
+" | |\n"
+" | `-------- sub-version\n"
+" |\n"
+" `------ always '1' because we don't change the ABI\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2383
+msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2385
+msgid ""
+"As time passes we cherry pick fixes from the development branch and backport "
+"those into the stable branch, the effect being that the stable branch should "
+"get more stable and less buggy over time. So the stable releases are ideal "
+"for people who don't need new features but would just like the software to "
+"work."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2391
+msgid "Our criteria for backporting changes are:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2397
+msgid ""
+"Documentation changes which don't affect any code are backported unless the "
+"documentation refers to a future feature which is not in stable."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2403
+msgid ""
+"Bug fixes which are not controversial, fix obvious problems, and have been "
+"well tested are backported."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2408
+msgid ""
+"Simple rearrangements of code which shouldn't affect how it works get "
+"backported. This is so that the code in the two branches doesn't get too "
+"far out of step, allowing us to backport future fixes more easily."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2414
+msgid ""
+"We I<don't> backport new features, new APIs, new tools etc, except in one "
+"exceptional case: the new feature is required in order to implement an "
+"important bug fix."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2420
+msgid ""
+"A new stable branch starts when we think the new features in development are "
+"substantial and compelling enough over the current stable branch to warrant "
+"it. When that happens we create new stable and development versions 1.N.0 "
+"and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
+"stable at this point, but by backporting fixes from development, that branch "
+"will stabilize over time."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:2428
+msgid "EXTENDING LIBGUESTFS"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2430
+msgid "ADDING A NEW API ACTION"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2432
+msgid ""
+"Large amounts of boilerplate code in libguestfs (RPC, bindings, "
+"documentation) are generated, and this makes it easy to extend the "
+"libguestfs API."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2436
+msgid "To add a new API action there are two changes:"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2442
+msgid ""
+"You need to add a description of the call (name, parameters, return type, "
+"tests, documentation) to C<generator/generator_actions.ml>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2445
+msgid ""
+"There are two sorts of API action, depending on whether the call goes "
+"through to the daemon in the appliance, or is serviced entirely by the "
+"library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
+"former, since the sync is done in the appliance. L</guestfs_set_trace> is "
+"an example of the latter, since a trace flag is maintained in the handle and "
+"all tracing is done on the library side."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2453
+msgid ""
+"Most new actions are of the first type, and get added to the "
+"C<daemon_functions> list. Each function has a unique procedure number used "
+"in the RPC protocol which is assigned to that action when we publish "
+"libguestfs and cannot be reused. Take the latest procedure number and "
+"increment it."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2459
+msgid ""
+"For library-only actions of the second type, add to the "
+"C<non_daemon_functions> list. Since these functions are serviced by the "
+"library and do not travel over the RPC mechanism to the daemon, these "
+"functions do not need a procedure number, and so the procedure number is set "
+"to C<-1>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2467
+msgid "Implement the action (in C):"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2469
+msgid ""
+"For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
+"C<daemon/> directory."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2472
+msgid ""
+"For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
+"(note: double underscore) in the C<src/> directory."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2475
+msgid "In either case, use another function as an example of what to do."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2479
+msgid "After making these changes, use C<make> to compile."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2481
+msgid ""
+"Note that you don't need to implement the RPC, language bindings, manual "
+"pages or anything else. It's all automatically generated from the OCaml "
+"description."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2485
+msgid "ADDING TESTS FOR AN API ACTION"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2487
+msgid ""
+"You can supply zero or as many tests as you want per API call. The tests "
+"can either be added as part of the API description "
+"(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
+"drop a script into C<regressions/>. Note that adding a script to "
+"C<regressions/> is slower, so if possible use the first method."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2493
+msgid ""
+"The following describes the test environment used when you add an API test "
+"in C<generator_actions.ml>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2496
+msgid "The test environment has 4 block devices:"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2500
+msgid "C</dev/sda> 500MB"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2502
+msgid "General block device for testing."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2504
+msgid "C</dev/sdb> 50MB"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2506
+msgid ""
+"C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
+"operations."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2509
+msgid "C</dev/sdc> 10MB"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2511
+msgid "Used in a few tests where two block devices are needed."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2513
+msgid "C</dev/sdd>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2515
+msgid "ISO with fixed content (see C<images/test.iso>)."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2519
+msgid ""
+"To be able to run the tests in a reasonable amount of time, the libguestfs "
+"appliance and block devices are reused between tests. So don't try testing "
+"L</guestfs_kill_subprocess> :-x"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2523
+msgid ""
+"Each test starts with an initial scenario, selected using one of the "
+"C<Init*> expressions, described in C<generator/generator_types.ml>. These "
+"initialize the disks mentioned above in a particular way as documented in "
+"C<generator_types.ml>. You should not assume anything about the previous "
+"contents of other disks that are not initialized."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2529
+msgid ""
+"You can add a prerequisite clause to any individual test. This is a "
+"run-time check, which, if it fails, causes the test to be skipped. Useful "
+"if testing a command which might not work on all variations of libguestfs "
+"builds. A test that has prerequisite of C<Always> means to run "
+"unconditionally."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2535
+msgid ""
+"In addition, packagers can skip individual tests by setting environment "
+"variables before running C<make check>."
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2538
+#, no-wrap
+msgid ""
+" SKIP_TEST_<CMD>_<NUM>=1\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2540
+msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2542
+msgid "or:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2544
+#, no-wrap
+msgid ""
+" SKIP_TEST_<CMD>=1\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2546
+msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2548
+msgid "Packagers can run only certain tests by setting for example:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2550
+#, no-wrap
+msgid ""
+" TEST_ONLY=\"vfs_type zerofree\"\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2552
+msgid ""
+"See C<capitests/tests.c> for more details of how these environment variables "
+"work."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2555
+msgid "DEBUGGING NEW API ACTIONS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2557
+msgid "Test new actions work before submitting them."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2559
+msgid "You can use guestfish to try out new commands."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2561
+msgid ""
+"Debugging the daemon is a problem because it runs inside a minimal "
+"environment. However you can fprintf messages in the daemon to stderr, and "
+"they will show up if you use C<guestfish -v>."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2565
+msgid "FORMATTING CODE AND OTHER CONVENTIONS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2567
+msgid ""
+"Our C source code generally adheres to some basic code-formatting "
+"conventions. The existing code base is not totally consistent on this "
+"front, but we do prefer that contributed code be formatted similarly. In "
+"short, use spaces-not-TABs for indentation, use 2 spaces for each "
+"indentation level, and other than that, follow the K&R style."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2573
+msgid ""
+"If you use Emacs, add the following to one of one of your start-up files "
+"(e.g., ~/.emacs), to help ensure that you get indentation right:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2576
+#, no-wrap
+msgid ""
+" ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
+" ;;; Exceptions: Makefile and ChangeLog modes.\n"
+" (add-hook 'find-file-hook\n"
+" '(lambda () (if (and buffer-file-name\n"
+" (string-match \"/libguestfs\\\\>\"\n"
+" (buffer-file-name))\n"
+" (not (string-equal mode-name \"Change Log\"))\n"
+" (not (string-equal mode-name \"Makefile\")))\n"
+" (setq indent-tabs-mode nil))))\n"
+" \n"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2586
+#, no-wrap
+msgid ""
+" ;;; When editing C sources in libguestfs, use this style.\n"
+" (defun libguestfs-c-mode ()\n"
+" \"C mode with adjusted defaults for use with libguestfs.\"\n"
+" (interactive)\n"
+" (c-set-style \"K&R\")\n"
+" (setq c-indent-level 2)\n"
+" (setq c-basic-offset 2))\n"
+" (add-hook 'c-mode-hook\n"
+" '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
+" (buffer-file-name))\n"
+" (libguestfs-c-mode))))\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2598
+msgid "Enable warnings when compiling (and fix any problems this finds):"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2601
+#, no-wrap
+msgid ""
+" ./configure --enable-gcc-warnings\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2603
+msgid "Useful targets are:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2605
+#, no-wrap
+msgid ""
+" make syntax-check # checks the syntax of the C code\n"
+" make check # runs the test suite\n"
+"\n"
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2608
+msgid "DAEMON CUSTOM PRINTF FORMATTERS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2610
+msgid ""
+"In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
+"which are used to do shell quoting."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2615
+msgid "%Q"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2617
+msgid ""
+"Simple shell quoted string. Any spaces or other shell characters are "
+"escaped for you."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2620
+msgid "%R"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2622
+msgid ""
+"Same as C<%Q> except the string is treated as a path which is prefixed by "
+"the sysroot."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2627 ../fish/guestfish.pod:240 ../fish/guestfish.pod:613
+msgid "For example:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2629
+#, no-wrap
+msgid ""
+" asprintf (&cmd, \"cat %R\", path);\n"
+"\n"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2631
+msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2633
+msgid ""
+"I<Note:> Do I<not> use these when you are passing parameters to the "
+"C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
+"because they are not passed via the shell (instead, straight to exec). You "
+"probably want to use the C<sysroot_path()> function however."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2639
+msgid "SUBMITTING YOUR NEW API ACTIONS"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2641
+msgid ""
+"Submit patches to the mailing list: "
+"L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
+"L<rjones@redhat.com>."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2645
+msgid "INTERNATIONALIZATION (I18N) SUPPORT"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2647
+msgid "We support i18n (gettext anyhow) in the library."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2649
+msgid ""
+"However many messages come from the daemon, and we don't translate those at "
+"the moment. One reason is that the appliance generally has all locale files "
+"removed from it, because they take up a lot of space. So we'd have to readd "
+"some of those, as well as copying our PO files into the appliance."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2655
+msgid ""
+"Debugging messages are never translated, since they are intended for the "
+"programmers."
+msgstr ""
+
+#. type: =head2
+#: ../src/guestfs.pod:2658
+msgid "SOURCE CODE SUBDIRECTORIES"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2662 ../src/guestfs-actions.pod:5814 ../fish/guestfish-actions.pod:3908
+msgid "C<appliance>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2664
+msgid "The libguestfs appliance, build scripts and so on."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2666
+msgid "C<capitests>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2668
+msgid "Automated tests of the C API."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2670
+msgid "C<cat>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2672
+msgid ""
+"The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
+"documentation."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2675
+msgid "C<contrib>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2677
+msgid "Outside contributions, experimental parts."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2679
+msgid "C<daemon>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2681
+msgid ""
+"The daemon that runs inside the libguestfs appliance and carries out "
+"actions."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2684
+msgid "C<df>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2686
+msgid "L<virt-df(1)> command and documentation."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2688
+msgid "C<examples>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2690
+msgid "C API example code."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2692
+msgid "C<fish>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2694
+msgid ""
+"L<guestfish(1)>, the command-line shell, and various shell scripts built on "
+"top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
+"L<virt-tar-out(1)>."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2698
+msgid "C<fuse>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2700
+msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2702
+msgid "C<generator>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2704
+msgid ""
+"The crucially important generator, used to automatically generate large "
+"amounts of boilerplate C code for things like RPC and bindings."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2707
+msgid "C<images>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2709
+msgid "Files used by the test suite."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2711
+msgid "Some \"phony\" guest images which we test against."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2713
+msgid "C<inspector>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2715
+msgid "L<virt-inspector(1)>, the virtual machine image inspector."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2717
+msgid "C<logo>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2719
+msgid "Logo used on the website. The fish is called Arthur by the way."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2721
+msgid "C<m4>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2723
+msgid "M4 macros used by autoconf."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2725
+msgid "C<po>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2727
+msgid "Translations of simple gettext strings."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2729
+msgid "C<po-docs>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2731
+msgid ""
+"The build infrastructure and PO files for translations of manpages and POD "
+"files. Eventually this will be combined with the C<po> directory, but that "
+"is rather complicated."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2735
+msgid "C<regressions>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2737
+msgid "Regression tests."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2739
+msgid "C<rescue>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2741
+msgid "L<virt-rescue(1)> command and documentation."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2743
+msgid "C<src>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2745
+msgid "Source code to the C library."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2747
+msgid "C<tools>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2749
+msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2751
+msgid "C<test-tool>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2753
+msgid ""
+"Test tool for end users to test if their qemu/kernel combination will work "
+"with libguestfs."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2756
+msgid "C<csharp>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2758
+msgid "C<haskell>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2760
+msgid "C<java>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2762
+msgid "C<ocaml>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2764
+msgid "C<php>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2766
+msgid "C<perl>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2768
+msgid "C<python>"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2770
+msgid "C<ruby>"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2772
+msgid "Language bindings."
+msgstr ""
+
+#. type: =head1
+#: ../src/guestfs.pod:2776 ../fish/guestfish.pod:1015 ../test-tool/libguestfs-test-tool.pod:82 ../tools/virt-edit.pl:476
+msgid "ENVIRONMENT VARIABLES"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2780 ../fish/guestfish.pod:1041
+msgid "LIBGUESTFS_APPEND"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2782 ../fish/guestfish.pod:1043
+msgid "Pass additional options to the guest kernel."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2784 ../fish/guestfish.pod:1045
+msgid "LIBGUESTFS_DEBUG"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2786
+msgid ""
+"Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
+"effect as calling C<guestfs_set_verbose (g, 1)>."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2789 ../fish/guestfish.pod:1050
+msgid "LIBGUESTFS_MEMSIZE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2791 ../fish/guestfish.pod:1052
+msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
+msgstr ""
+
+#. type: verbatim
+#: ../src/guestfs.pod:2794 ../fish/guestfish.pod:1055
+#, no-wrap
+msgid ""
+" LIBGUESTFS_MEMSIZE=700\n"
+"\n"
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2796 ../fish/guestfish.pod:1057
+msgid "LIBGUESTFS_PATH"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2798
+msgid ""
+"Set the path that libguestfs uses to search for a supermin appliance. See "
+"the discussion of paths in section L</PATH> above."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2801 ../fish/guestfish.pod:1062
+msgid "LIBGUESTFS_QEMU"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2803 ../fish/guestfish.pod:1064
+msgid ""
+"Set the default qemu binary that libguestfs uses. If not set, then the qemu "
+"which was found at compile time by the configure script is used."
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2807
+msgid "See also L</QEMU WRAPPERS> above."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2809 ../fish/guestfish.pod:1068
+msgid "LIBGUESTFS_TRACE"
+msgstr ""
+
+#. type: textblock
+#: ../src/guestfs.pod:2811
+msgid ""
+"Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
+"effect as calling C<guestfs_set_trace (g, 1)>."
+msgstr ""
+
+#. type: =item
+#: ../src/guestfs.pod:2814 ../fish/guestfish.pod:1077
+msgid "TMPDIR"
+msgstr ""