Minor clarifications to developer docs.
[virt-top.git] / virt-df / README
1 $Id$
2
3 For user documentation:
4
5 Please see the manual page (virt-df.pod or virt-df.txt in this
6 directory).
7
8 Developer documentation
9 ----------------------------------------------------------------------
10
11 This program has suddenly become rather large and confusing.
12 Hopefully this documentation should go some way towards explaining
13 what is going on inside the source.
14
15 The main program consists of two modules:
16
17  - virt_df.ml / virt_df.mli (module name: Virt_df)
18
19    This has evolved into a library of miscellaneous functions
20    and values which are included throughout the rest of the
21    program.  If you see an unexplained function then it's
22    likely that it is defined in here.
23
24    Start by reading virt_df.mli which contains the full types
25    and plenty of documentation.
26
27  - virt_df_main.ml
28
29    This is the program.  It reads the command line arguments,
30    loads the domain descriptions, calls out to the plug-ins
31    to probe for disks / partitions / filesystems / etc., and
32    finally prints the results.
33
34    The file consists of basically one large program that
35    does all of the above in sequence.
36
37 Everything else in this directory is a plug-in specialized for probing
38 a particular filesystem, partition scheme or type of LVM.  The
39 plug-ins at time of writing are:
40
41  - virt_df_ext2.ml / virt_df_ext2.mli
42
43    EXT2/3/4 plug-in.
44
45  - virt_df_linux_swap.ml / virt_df_linux_swap.mli
46
47    Linux swap (new style) plug-in.
48
49  - virt_df_mbr.ml / virt_df_mbr.mli
50
51    Master Boot Record (MS-DOS) disk partitioning plug-in.
52
53  - virt_df_lvm2*
54
55    LVM2 parsing, which is by far the most complex plug-in.
56    It consists of:
57
58    - virt_df_lvm2.ml
59    - virt_df_lvm2.mli
60      LVM2 probing, PV detection.
61
62    - virt_df_lvm2_parser.mly
63    - virt_df_lvm2_lexer.mll
64      Scanner/parser for parsing LVM2 metadata definitions.
65
66    - virt_df_lvm2_metadata.ml
67    - virt_df_lvm2_metadata.mli
68      AST for LVM2 metadata definitions.