Files
libguestfs/generator
Richard W.M. Jones ffbf1475f7 New API: guestfs_shutdown: Cleanly shutdown the backend.
The new API splits orderly close into a two-step process:

  if (guestfs_shutdown (g) == -1) {
    /* handle the error, eg. qemu error */
  }
  guestfs_close (g);

Note that the explicit shutdown step is only necessary in the case
where you have made changes to the disk image and want to handle write
errors.  Read the documentation for further information.

This change also:

 - deprecates guestfs_kill_subprocess

 - turns guestfs_kill_subprocess into the same as guestfs_shutdown

 - changes guestfish and other tools to call shutdown + close
   where necessary (not for read-only tools)

 - updates documentation

 - updates examples
2012-07-03 21:27:29 +01:00
..
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00
2012-04-25 17:32:30 +01:00
2012-01-18 22:05:02 +00:00
2012-01-18 22:05:02 +00:00

This program generates a large amount of code and documentation for
all the daemon actions.

To add a new action there are only two files you need to change,
'generator_actions.ml' to describe the interface, and
daemon/<somefile>.c to write the implementation.

After editing these files, build it (make -C generator) to regenerate
all the output files.  'make' will rerun this automatically when
necessary.

IMPORTANT: This program should NOT print any warnings at compile time
or run time.  If it prints warnings, you should treat them as errors.

OCaml tips:

(1) In emacs, install tuareg-mode to display and format OCaml code
correctly.  'vim' comes with a good OCaml editing mode by default.

(2) Read the resources at http://ocaml-tutorial.org/

(3) A module called 'Generator_foo' is defined in one or two files
called 'generator_foo.mli' and 'generator_foo.ml' (NB: lowercase first
letter).  The *.mli file, if present, defines the public interface for
the module.  The *.ml file is the implementation.  If the *.mli file
is missing then everything is exported.

Some notable files in this directory:

generator_actions.ml          The libguestfs API.
generator_structs.ml          Structures returned by the API.
generator_c.ml                Generate C API.
generator_<lang>.ml           Generate bindings for <lang>.
generator_main.ml             The main generator program.