Files
libguestfs/recipes
Richard Jones 3920ad95f6 New API: write for creating files with fixed content (RHBZ#501889).
The guestfs_write call can be used to create small files with
arbitrary 8 bit content, including \0 bytes.

This replaces and deprecates write-file, which cannot be modified
to use BufferIn because of an unfortunate choice in the ABI: the
size parameter to write-file, if zero, means that the daemon tries
to calculate the length of the buffer using strlen.  However this
fails if we pass a zero-length buffer using BufferIn because then
the daemon tries to do strlen on a (really) zero length buffer, not
even containing a terminating \0 character, thus segfaulting.
2010-05-20 10:30:12 +01:00
..
2009-04-25 18:28:24 +01:00
2009-04-25 18:28:24 +01:00
2009-04-25 11:34:18 +01:00
2009-07-03 17:04:21 +02:00
2009-04-25 22:59:19 +01:00
2009-07-03 17:04:21 +02:00
2009-04-25 22:56:34 +01:00
2009-04-25 22:56:34 +01:00
2009-04-25 11:34:18 +01:00
2009-04-26 07:05:12 +01:00
2009-04-26 06:48:31 +01:00
2009-04-26 06:48:31 +01:00
2009-04-25 11:34:18 +01:00
2009-05-29 16:12:51 +01:00
2009-05-29 16:12:51 +01:00
2009-05-29 16:12:51 +01:00
2009-04-26 07:05:12 +01:00
2009-05-29 16:12:51 +01:00

This directory contains guestfish-based shell which give some useful
recipes to follow.

These also get copied to the website here:
http://libguestfs.org/recipes.html

The format for each recipe is:

  foo.sh           Shell script, using guestfish.
  foo.title        The title of the recipe.
  foo.html         HTML snippet describing the recipe.
  foo.example      Plain text snippet showing example output.

Everything in the recipes/ directory may be used and distributed
without restrictions.

To run a script before libguestfs has been installed, you can do
something like this:

  LIBGUESTFS_PATH=../appliance PATH=../fish:$PATH ./show-devices.sh disk.img

You can apply these recipes in your own programs by translating the
guestfish commands into API calls in the language of your choice.  The
translation is a simple 1-1 mapping.

Got a useful tip or recipe?  Please contribute ...