1 For user documentation:
3 Please see the manual page (virt-df.pod or virt-df.txt in this
6 Developer documentation
7 ----------------------------------------------------------------------
9 This subdirectory contains a library of useful functions for parsing
12 It is all based on and uses the pa_bitmatch syntax extension &
13 library. You need pa_bitmatch >= 0.5.
15 This program has suddenly become rather large and confusing.
16 Hopefully this documentation should go some way towards explaining
17 what is going on inside the source.
19 The main program consists of two modules:
21 - diskimage.ml / diskimage.mli (module name: Diskimage)
23 This has evolved into a library of miscellaneous functions
24 and values which are included throughout the rest of the
25 program. If you see an unexplained function then it's
26 likely that it is defined in here.
28 Start by reading diskimage.mli which contains the full types
29 and plenty of documentation.
33 This is the program. It reads the command line arguments,
34 loads the domain descriptions, calls out to the plug-ins
35 to probe for disks / partitions / filesystems / etc., and
36 finally prints the results.
38 The file consists of basically one large program that
39 does all of the above in sequence.
41 Everything else in this directory is a plug-in specialized for probing
42 a particular filesystem, partition scheme or type of LVM. The
43 plug-ins at time of writing are:
45 - diskimage_ext2.ml / diskimage_ext2.mli
49 - diskimage_linux_swap.ml / diskimage_linux_swap.mli
51 Linux swap (new style) plug-in.
53 - diskimage_mbr.ml / diskimage_mbr.mli
55 Master Boot Record (MS-DOS) disk partitioning plug-in.
59 LVM2 parsing, which is by far the most complex plug-in.
64 LVM2 probing, PV detection.
66 - diskimage_lvm2_parser.mly
67 - diskimage_lvm2_lexer.mll
68 Scanner/parser for parsing LVM2 metadata definitions.
70 - diskimage_lvm2_metadata.ml
71 - diskimage_lvm2_metadata.mli
72 AST for LVM2 metadata definitions.