Debugging tips.
[libguestfs.git] / HACKING
1 Adding a new action
2 ----------------------------------------------------------------------
3
4 All action functions are generated automatically, so there are only
5 two files you need to edit:
6
7 (1) src/generator.ml: Add your new action, parameters, description,
8 etc. to the big list called 'functions' at the top of this file.
9
10 (2) Edit/create a C file in daemon/ subdirectory which implements your
11 'do_action' function.  Take a look at one of the numerous examples
12 there.
13
14 You will need to run src/generator.ml (from the top directory) which
15 regenerates all the auto-generated files, and then continue with the
16 ordinary build process.
17
18 Formatting
19 ----------------------------------------------------------------------
20
21 Try to use GNU / Emacs default formatting, following the convention
22 used elsewhere in the source.
23
24 Please make sure that the code compiles without warnings.
25
26 Please test any changes
27
28 Debugging
29 ----------------------------------------------------------------------
30
31 Use 'guestfish -v', which will show error messages etc from the
32 daemon.
33
34 Patches
35 ----------------------------------------------------------------------
36
37 Submit patches to the fedora-virt mailing list:
38 http://www.redhat.com/mailman/listinfo/fedora-virt
39 and CC to rjones@redhat.com