Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- main.ml.orig 2013-08-09 10:08:23.184172328 +0400
- +++ main.ml 2013-08-09 10:10:47.336066768 +0400
- @@ -43,6 +43,7 @@
- let selinux_relabel = ref `Auto in
- let trace = ref false in
- let verbose = ref false in
- + let mount_opts = ref "" in
- let display_version () =
- let g = new G.guestfs () in
- @@ -96,6 +97,7 @@
- let basic_args = [
- "-a", Arg.String add_file, s_"file" ^ " " ^ s_"Add disk image file";
- "--add", Arg.String add_file, s_"file" ^ " " ^ s_"Add disk image file";
- + "--mount-options", Arg.Set_string mount_opts, s_"opts" ^ " " ^ s_"Set mount options";
- "-c", Arg.Set_string libvirturi, s_"uri" ^ " " ^ s_"Set libvirt URI";
- "--connect", Arg.Set_string libvirturi, s_"uri" ^ " " ^ s_"Set libvirt URI";
- "--debug-gc", Arg.Set debug_gc, " " ^ s_"Debug GC and memory allocations (internal)";
- @@ -205,8 +207,14 @@
- let mps = List.sort cmp mps in
- List.iter (
- fun (mp, dev) ->
- - try g#mount dev mp
- - with Guestfs.Error msg -> eprintf (f_"%s (ignored)\n") msg
- + if mount_opts then (
- + try g#mount_options mount_opts dev mp
- + with Guestfs.Error msg -> eprintf (f_"%s (ignored)\n") msg
- + ) else (
- + try g#mount dev mp
- + with Guestfs.Error msg -> eprintf (f_"%s (ignored)\n") msg
- + );
- +
- ) mps;
- (* Perform the filesystem operations. *)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement