|
13 | 13 | *) |
14 | 14 |
|
15 | 15 | open Lwt |
16 | | -open Xs_protocol |
17 | 16 | module Client = Xs_client_lwt.Client (Xs_transport_lwt_unix_client) |
18 | 17 | open Client |
19 | 18 |
|
20 | | -let ( |> ) a b = b a |
21 | | - |
22 | 19 | (* So we can run against a real xenstore, place all nodes in a subtree *) |
23 | 20 | let prefix = "/bench" |
24 | 21 |
|
@@ -49,7 +46,7 @@ module Device = struct |
49 | 46 | | "vfs" -> Some Vfs |
50 | 47 | | "vfb" -> Some Vfb |
51 | 48 | | "vkbd" -> Some Vkbd |
52 | | - | x -> None |
| 49 | + | _ -> None |
53 | 50 |
|
54 | 51 | let string_of_kind = function |
55 | 52 | | Vif -> "vif" |
@@ -171,12 +168,6 @@ module Device = struct |
171 | 168 | (* The private data path is only used by xapi and ignored by frontend and backend *) |
172 | 169 | let get_private_path domid = Printf.sprintf "%s/%d" private_path domid |
173 | 170 |
|
174 | | - let get_private_data_path_of_device (x : device) = |
175 | | - Printf.sprintf "%s/private/%s/%d" |
176 | | - (get_private_path x.frontend.domid) |
177 | | - (string_of_kind x.backend.kind) |
178 | | - x.backend.devid |
179 | | - |
180 | 171 | (* Path in xenstore where we stuff our transient hotplug-related stuff *) |
181 | 172 | let get_hotplug_path (x : device) = |
182 | 173 | Printf.sprintf "%s/hotplug/%s/%d" |
@@ -404,8 +395,8 @@ let vm_shutdown domid client = |
404 | 395 | let vm_start domid client = |
405 | 396 | let vbd devid = |
406 | 397 | { |
407 | | - Device.frontend = { Device.domid; kind = Device.Vbd; devid = 0 }; |
408 | | - backend = { Device.domid = 0; kind = Device.Vbd; devid = 0 }; |
| 398 | + Device.frontend = { Device.domid; kind = Device.Vbd; devid }; |
| 399 | + backend = { Device.domid = 0; kind = Device.Vbd; devid }; |
409 | 400 | } |
410 | 401 | in |
411 | 402 | Domain.make domid client >>= fun () -> |
@@ -486,7 +477,7 @@ let main () = |
486 | 477 | (match path with |
487 | 478 | | Some path -> Xs_transport.xenstored_socket := path |
488 | 479 | | None -> ()); |
489 | | - let n, args = extract args "-n" in |
| 480 | + let n, _ = extract args "-n" in |
490 | 481 | let n = match n with None -> 300 | Some n -> int_of_string n in |
491 | 482 |
|
492 | 483 | make () >>= fun client -> |
|
0 commit comments