From 4b2bcd59292694f49a9cdaed60154753d1a6044b Mon Sep 17 00:00:00 2001 From: Hannes Mehnert Date: Thu, 3 Jan 2019 22:30:07 +0100 Subject: [PATCH] adjust to ipaddr3 --- lib/xenstore.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/xenstore.ml b/lib/xenstore.ml index bee21c7..979a596 100644 --- a/lib/xenstore.ml +++ b/lib/xenstore.ml @@ -72,11 +72,11 @@ module Make(Xs: Xs_client_lwt.S) = struct Xs.(immediate xsc (fun h -> read h (frontend / "mac"))) >|= Macaddr.of_string >>= function - | Some x -> return x - | None -> + | Ok x -> return x + | Error (`Msg msg) -> let m = Macaddr.make_local (fun _ -> Random.int 255) in - Log.info (fun f -> f "%s: no configured MAC, using %s" - (Sexplib.Sexp.to_string (S.sexp_of_id id)) (Macaddr.to_string m)); + Log.info (fun f -> f "%s: no configured MAC (error: %s), using %a" + (Sexplib.Sexp.to_string (S.sexp_of_id id)) msg Macaddr.pp m); return m let read_features side path =