3 For user documentation:
5 Please see the manual page (virt-df.pod or virt-df.txt in this
8 Developer documentation
9 ----------------------------------------------------------------------
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.
15 The main program consists of two modules:
17 - virt_df.ml / virt_df.mli (module name: Virt_df)
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.
24 Start by reading virt_df.mli which contains the full types
25 and plenty of documentation.
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.
34 The file consists of basically one large program that
35 does all of the above in sequence.
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:
41 - virt_df_ext2.ml / virt_df_ext2.mli
45 - virt_df_linux_swap.ml / virt_df_linux_swap.mli
47 Linux swap (new style) plug-in.
49 - virt_df_mbr.ml / virt_df_mbr.mli
51 Master Boot Record (MS-DOS) disk partitioning plug-in.
55 LVM2 parsing, which is by far the most complex plug-in.
60 LVM2 probing, PV detection.
62 - virt_df_lvm2_parser.mly
63 - virt_df_lvm2_lexer.mll
64 Scanner/parser for parsing LVM2 metadata definitions.
66 - virt_df_lvm2_metadata.ml
67 - virt_df_lvm2_metadata.mli
68 AST for LVM2 metadata definitions.