@@ -42,18 +42,10 @@ let backend_error name args =
4242 Exception. rpc_of_exnty exnty
4343
4444let backend_backtrace_error name args error =
45- match List. zip error.files error.lines with
46- | None -> backend_error " SCRIPT_FAILED" [ " malformed backtrace in error output" ]
47- | Some pairs ->
48- let backtrace =
49- pairs
50- |> List. map ~f: (fun (filename , line ) -> { B.Interop. filename; line })
51- |> B.Interop. to_backtrace
52- |> B. sexp_of_t
53- |> Sexplib.Sexp. to_string in
54- let open Storage_interface in
55- let exnty = Exception. Backend_error_with_backtrace (name, backtrace :: args) in
56- Exception. rpc_of_exnty exnty
45+ let error = rpc_of_error error |> Jsonrpc. to_string in
46+ let open Storage_interface in
47+ let exnty = Exception. Backend_error_with_backtrace (name, error :: args) in
48+ Exception. rpc_of_exnty exnty
5749
5850let missing_uri () =
5951 backend_error " MISSING_URI" [ " Please include a URI in the device-config" ]
@@ -361,7 +353,9 @@ let process root_dir name x =
361353 | Storage.D.Types. Tapdisk3 p -> " vbd3" , p in
362354 let attach_info = {
363355 params;
364- xenstore_data = [ " backend-kind" , backend ]
356+ xenstore_data = [ " backend-kind" , backend ];
357+ o_direct = true ;
358+ o_direct_reason = " " ;
365359 } in
366360 Deferred.Result. return (R. success (Args.VDI.Attach. rpc_of_response attach_info))
367361 | { R. name = "VDI.activate" ; R. params = [ args ] } ->
0 commit comments