X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fexamples%2Finspect_vm.ml;h=44d348e79244d6bdbc5526f6aa30eb1b1f51fd9a;hb=c6340f45007b0ab7e1c5391cf78afc10a816553f;hp=1d370c958b6d1011c8d32e4a7c2b53c2a98ee798;hpb=086bd1f7bfab4c10d890ecca3506a1b091c0d398;p=libguestfs.git diff --git a/ocaml/examples/inspect_vm.ml b/ocaml/examples/inspect_vm.ml index 1d370c9..44d348e 100644 --- a/ocaml/examples/inspect_vm.ml +++ b/ocaml/examples/inspect_vm.ml @@ -43,7 +43,11 @@ let () = let cmp (a,_) (b,_) = compare (String.length a) (String.length b) in let mps = List.sort cmp mps in - List.iter (fun (mp, dev) -> g#mount_ro dev mp) mps; + List.iter ( + fun (mp, dev) -> + try g#mount_ro dev mp + with Guestfs.Error msg -> eprintf "%s (ignored)\n" msg + ) mps; (* If /etc/issue.net file exists, print up to 3 lines. *) let filename = "/etc/issue.net" in