summaryrefslogtreecommitdiffstats
path: root/virt-top/virt_top_main.ml
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2007-10-19 13:21:43 +0100
committerRichard W.M. Jones <rjones@redhat.com>2007-10-19 13:21:43 +0100
commit22fd1362126a96472a921d3767ca3220ab13da5a (patch)
treeb16b5e7709a8c2e172d5dec919ce57097ea1c9f8 /virt-top/virt_top_main.ml
parent0ad7e5238fa76ebcfa8abfda8e44d0c62b927e7c (diff)
downloadvirt-top-22fd1362126a96472a921d3767ca3220ab13da5a.tar.gz
virt-top-22fd1362126a96472a921d3767ca3220ab13da5a.tar.xz
virt-top-22fd1362126a96472a921d3767ca3220ab13da5a.zip
Reorganised the code to put more utility functions into virt_top_utils.
Added explicit interfaces for Virt_top_utils & Virt_top modules. Corrected use of endwin when _not_ in script mode.
Diffstat (limited to 'virt-top/virt_top_main.ml')
-rw-r--r--virt-top/virt_top_main.ml8
1 files changed, 4 insertions, 4 deletions
diff --git a/virt-top/virt_top_main.ml b/virt-top/virt_top_main.ml
index cb3486e..ba98e7e 100644
--- a/virt-top/virt_top_main.ml
+++ b/virt-top/virt_top_main.ml
@@ -30,19 +30,19 @@ open Virt_top
* the program under --debug ...).
*)
let error =
- let setup = start_up () in
+ let ((_, _, script_mode, _, _, _, _) as setup) = start_up () in
try
main_loop setup;
- if !script_mode then endwin ();
+ if not script_mode then endwin ();
false
with
| Libvirt.Virterror err ->
- endwin ();
+ if not script_mode then endwin ();
prerr_endline (Libvirt.Virterror.to_string err);
true
| exn ->
- endwin ();
+ if not script_mode then endwin ();
prerr_endline ("Error: " ^ Printexc.to_string exn);
true