git.annexia.org
/
ocaml-libvirt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct mlvirsh for new read-write connection.
[ocaml-libvirt.git]
/
mlvirsh
/
mlvirsh.ml
diff --git
a/mlvirsh/mlvirsh.ml
b/mlvirsh/mlvirsh.ml
index
9fd3779
..
53a0493
100644
(file)
--- a/
mlvirsh/mlvirsh.ml
+++ b/
mlvirsh/mlvirsh.ml
@@
-304,7
+304,7
@@
let do_command =
in
let print_domain_list doms =
List.iter (
in
let print_domain_list doms =
List.iter (
- fun
dom
->
+ fun
(dom, info)
->
let id =
try sprintf "%d" (D.get_id dom)
with Libvirt.Virterror _ -> "" in
let id =
try sprintf "%d" (D.get_id dom)
with Libvirt.Virterror _ -> "" in
@@
-313,7
+313,7
@@
let do_command =
with Libvirt.Virterror _ -> "" in
let state =
try
with Libvirt.Virterror _ -> "" in
let state =
try
- let { D.state = state } =
D.get_info dom
in
+ let { D.state = state } =
info
in
string_of_domain_state state
with Libvirt.Virterror _ -> "" in
printf "%5s %-30s %s\n" id name state
string_of_domain_state state
with Libvirt.Virterror _ -> "" in
printf "%5s %-30s %s\n" id name state
@@
-466,7
+466,7
@@
let do_command =
in
loop 0;
buf)
in
loop 0;
buf)
- (arg_
readonly
_connection domain_of_string)
+ (arg_
full
_connection domain_of_string)
string_of_string Int64.of_string int_of_string,
s_"Peek into a block device of a domain.",
[dom_help; s_"path",s_"Path to block device";
string_of_string Int64.of_string int_of_string,
s_"Peek into a block device of a domain.",
[dom_help; s_"path",s_"Path to block device";
@@
-516,7
+516,7
@@
let do_command =
in
loop 0;
buf)
in
loop 0;
buf)
- (arg_
readonly
_connection domain_of_string)
+ (arg_
full
_connection domain_of_string)
Int64.of_string int_of_string,
s_"Peek into memory of a device.",
[dom_help; s_"offset",s_"Offset in memory";
Int64.of_string int_of_string,
s_"Peek into memory of a device.",
[dom_help; s_"offset",s_"Offset in memory";
@@
-579,14
+579,21
@@
let do_command =
cmd0 print_domain_list
(fun () ->
let c = get_readonly_connection () in
cmd0 print_domain_list
(fun () ->
let c = get_readonly_connection () in
- fst (Libvirt.get_domains c ~want_info:false [D.ListActive])),
+ D.get_domains_and_infos c [D.ListActive]),
+ s_"List the running domains.",
+ [];
+ "list-all",
+ cmd0 print_domain_list
+ (fun () ->
+ let c = get_readonly_connection () in
+ D.get_domains_and_infos c [D.ListAll]),
s_"List the running domains.",
[];
"list-defined",
cmd0 print_domain_list
(fun () ->
let c = get_readonly_connection () in
s_"List the running domains.",
[];
"list-defined",
cmd0 print_domain_list
(fun () ->
let c = get_readonly_connection () in
-
fst (Libvirt.get_domains c ~want_info:false [D.ListInactive])
),
+
D.get_domains_and_infos c [D.ListInactive]
),
s_"List the defined but not running domains.",
[];
"quit",
s_"List the defined but not running domains.",
[];
"quit",