search for: mountfn

Displaying 1 result from an estimated 1 matches for "mountfn".

Did you mean: mountfs
2016 Mar 03
1
[PATCH] mllib: factor out mounting of guest root
...EG with Unix.Unix_error _ -> false + +let inspect_mount_root g ?mount_opts_fn root = + let mps = g#inspect_get_mountpoints root in + let cmp (a,_) (b,_) = + compare (String.length a) (String.length b) in + let mps = List.sort cmp mps in + List.iter ( + fun (mp, dev) -> + let mountfn = + match mount_opts_fn with + | Some fn -> g#mount_options (fn mp) + | None -> g#mount in + try mountfn dev mp + with Guestfs.Error msg -> warning (f_"%s (ignored)") msg + ) mps + +let inspect_mount_root_ro = + inspect_mount_root ~mount_opts_fn:(...