Skip to content

Commit 9f73c1a

Browse files
committed
Xen 4.1: Changes and refactoring to cope with our xapi-libs upstreaming move
Signed-off-by: Zheng Li <[email protected]>
1 parent d264b34 commit 9f73c1a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ocaml/xapi/xapi.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ module W=Debug.Debugger(struct let name="watchdog" end)
3535

3636
let check_control_domain () =
3737
let domuuid = with_xc (fun xc -> Domain.get_uuid ~xc 0) in
38+
let domuuid = Uuid.to_string domuuid in
3839
let uuid = Xapi_inventory.lookup Xapi_inventory._control_domain_uuid in
39-
let uuid = Uuid.of_string uuid in
4040
if domuuid <> uuid then (
4141
info "dom0 uuid mismatch with inventory -- setting it the proper value";
4242
with_xc (fun xc -> Xc.domain_sethandle xc 0 uuid)

ocaml/xenops/domain.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ let make ~xc ~xs info uuid =
115115
) else
116116
default_flags
117117
) else [] in
118-
let domid = Xc.domain_create xc info.ssidref flags uuid in
118+
let domid = Xc.domain_create xc info.ssidref flags (Uuid.to_string uuid) in
119119
let name = if info.name <> "" then info.name else sprintf "Domain-%d" domid in
120120
try
121121
let dom_path = xs.Xs.getdomainpath domid in
@@ -370,7 +370,7 @@ let destroy ?(preserve_xs_vm=false) ~xc ~xs domid =
370370
(* CA-13801: to avoid confusing people, we shall change this domain's uuid *)
371371
let s = Printf.sprintf "deadbeef-dead-beef-dead-beef0000%04x" domid in
372372
warn "Domain stuck in dying state after 30s; resetting UUID to %s" s;
373-
Xc.domain_sethandle xc domid (Uuid.of_string s);
373+
Xc.domain_sethandle xc domid s;
374374
raise (Domain_stuck_in_dying_state domid)
375375
end
376376

ocaml/xenops/tests.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ let test_xal2 () =
179179

180180
let test_domain_creation xc =
181181
assert_nodomain xc;
182-
let uuid = Uuid.make_uuid () in
182+
let uuid = Uuid.to_string (Uuid.make_uuid ()) in
183183
let domid = Xc.domain_create xc 0l false uuid in
184184
Xc.domain_destroy xc domid;
185185
assert_nodomain xc

0 commit comments

Comments
 (0)