|
|
263533 |
From cc9f1f9d8f17e8ac5a6a73af830c132d916fd6e0 Mon Sep 17 00:00:00 2001
|
|
|
263533 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
263533 |
Date: Mon, 27 Mar 2017 12:30:01 +0100
|
|
|
263533 |
Subject: [PATCH 08/20] Refresh HACKING file.
|
|
|
263533 |
|
|
|
263533 |
Fixes commit b7c3ef13cbd9c9cd49005a32ffb70faf6f5bbe8c.
|
|
|
263533 |
---
|
|
|
263533 |
HACKING | 72 ++-------------------------------------------------------
|
|
|
263533 |
1 file changed, 2 insertions(+), 70 deletions(-)
|
|
|
263533 |
|
|
|
263533 |
diff --git a/HACKING b/HACKING
|
|
|
263533 |
index bce40a9..3cd266b 100644
|
|
|
263533 |
--- a/HACKING
|
|
|
263533 |
+++ b/HACKING
|
|
|
263533 |
@@ -7,75 +7,7 @@ General OCaml advice:
|
|
|
263533 |
|
|
|
263533 |
(2) Emacs users: use tuareg-mode for editing OCaml.
|
|
|
263533 |
|
|
|
263533 |
-(3) http://www.ocaml-tutorial.org/
|
|
|
263533 |
+(3) https://realworldocaml.org/ is the definitive book which is also
|
|
|
263533 |
+ available online in full.
|
|
|
263533 |
|
|
|
263533 |
(4) http://camltastic.blogspot.com/2008/08/3-things-that-will-confuse-you-when.html
|
|
|
263533 |
-
|
|
|
263533 |
-The code is structured into these files:
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_utils.mli / virt_top_utils.ml
|
|
|
263533 |
-
|
|
|
263533 |
- String functions and other small utility functions. This is
|
|
|
263533 |
- included directly into virt_top.ml.
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_version.ml
|
|
|
263533 |
-
|
|
|
263533 |
- The version number (automatically generated by configure).
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top.mli / virt_top.ml
|
|
|
263533 |
-
|
|
|
263533 |
- This is the virt-top program.
|
|
|
263533 |
-
|
|
|
263533 |
- The two interesting functions are called 'collect' and 'redraw'.
|
|
|
263533 |
-
|
|
|
263533 |
- 'collect' collects all the information about domains, etc.
|
|
|
263533 |
-
|
|
|
263533 |
- 'redraw' updates the display on each frame.
|
|
|
263533 |
-
|
|
|
263533 |
- Another interesting function is 'start_up' which handles all
|
|
|
263533 |
- start-up stuff, eg. command line arguments, connecting to the
|
|
|
263533 |
- hypervisor, enabling curses.
|
|
|
263533 |
-
|
|
|
263533 |
- The function 'main_loop' runs the main loop and has sub-functions
|
|
|
263533 |
- to deal with keypresses, help screens and so on.
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_xml.ml
|
|
|
263533 |
-
|
|
|
263533 |
- Any code which needs the optional xml-light library goes
|
|
|
263533 |
- in here. Mainly for parsing domain XML descriptions to get
|
|
|
263533 |
- the list of block devices and network interfaces.
|
|
|
263533 |
-
|
|
|
263533 |
- The reason for having it in a separate file is so that we
|
|
|
263533 |
- don't depend on xml-light.
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_csv.ml
|
|
|
263533 |
-
|
|
|
263533 |
- Any code which needs the optional ocaml-csv library goes
|
|
|
263533 |
- in here. This implements the --csv command line option.
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_calendar1.ml
|
|
|
263533 |
- virt_top_calendar2.ml
|
|
|
263533 |
-
|
|
|
263533 |
- Any code which needs the optional ocaml-calendar library
|
|
|
263533 |
- goes in here. This implements the --end-time command line
|
|
|
263533 |
- option. Note there are two incompatible versions of the
|
|
|
263533 |
- ocaml-calendar library, which is why we have two
|
|
|
263533 |
- implementations. The Makefile works out which one to use.
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_gettext.ml
|
|
|
263533 |
-
|
|
|
263533 |
- Gettext interaction (this is generated by ./configure).
|
|
|
263533 |
-
|
|
|
263533 |
- virt_top_main.ml
|
|
|
263533 |
-
|
|
|
263533 |
- This is just a small bit of code to glue the modules above
|
|
|
263533 |
- together.
|
|
|
263533 |
-
|
|
|
263533 |
-The man-page is generated from the single file:
|
|
|
263533 |
-
|
|
|
263533 |
- virt-top.pod
|
|
|
263533 |
-
|
|
|
263533 |
-which generates (using perldoc) the following:
|
|
|
263533 |
-
|
|
|
263533 |
- virt-top.1
|
|
|
263533 |
- virt-top.txt
|
|
|
263533 |
--
|
|
|
263533 |
2.19.0.rc0
|
|
|
263533 |
|