[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 2 of 9] CA-31528: remove the Xal DevWorking and DevClosing events from Xal since they are unused



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259595834 0
# Node ID c793d4a3f647b335cb665a1d15f2f2ef01241166
# Parent  3ecb328d9cdc2e9c86b9715bc649cfd02d7aa11d
CA-31528: remove the Xal DevWorking and DevClosing events from Xal since they 
are unused.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 3ecb328d9cdc -r c793d4a3f647 ocaml/xenops/xal.ml
--- a/ocaml/xenops/xal.ml       Mon Nov 30 15:43:53 2009 +0000
+++ b/ocaml/xenops/xal.ml       Mon Nov 30 15:43:54 2009 +0000
@@ -28,8 +28,6 @@
 
 type dev_event =
        (* devices : backend / type / devid *)
-       | DevWorking of bool * string * string
-       | DevClosing of bool * string * string
        | DevClosed of bool * string * string
        | DevError of string * string * string
        | DevEject of string * string
@@ -73,10 +71,6 @@
        let string_of_string_opt = function None -> "\"\"" | Some s -> s in
        let string_of_b b = if b then "B" else "F" in
        match ev with
-       | DevWorking (b, s, i) ->
-               sprintf "device working {%s,%s,%s}" (string_of_b b) s i
-       | DevClosing (b, s, i) ->
-               sprintf "device closing {%s,%s,%s}" (string_of_b b) s i
        | DevClosed (b, s, i) ->
                sprintf "device closed {%s,%s,%s}" (string_of_b b) s i
        | DevError (s, i, e) ->
@@ -575,19 +569,13 @@
         with e -> error "Caught exception: %s while closing xc" 
(Printexc.to_string e))
 
 let diff_device_state backend ty devid oldstate newstate =
-       let working () = DevWorking (backend, ty, devid)
-       and closing () = DevClosing (backend, ty, devid)
-       and closed () = DevClosed (backend, ty, devid) in
+       let closed () = DevClosed (backend, ty, devid) in
        if oldstate <> newstate then
                match oldstate, newstate with
-               | Connecting, Connected  -> [ working () ]
-               | Connecting, Closing    -> [ closing () ]
-               | Connecting, Closed     -> [ closing (); closed () ]
+               | Connecting, Closed     -> [ closed () ]
                | Connected,  Closing    -> [ closed () ]
-               | Connected,  Closed     -> [ closing (); closed () ]
+               | Connected,  Closed     -> [ closed () ]
                | Closing,    Closed     -> [ closed () ]
-               | Closed,     Connected  -> [ working () ]
-               | Closed,     Closing    -> [ closing () ]
                (* those should not happen *)
                | Closing,    Connecting -> []
                | Closing,    Connected  -> []
diff -r 3ecb328d9cdc -r c793d4a3f647 ocaml/xenops/xal.mli
--- a/ocaml/xenops/xal.mli      Mon Nov 30 15:43:53 2009 +0000
+++ b/ocaml/xenops/xal.mli      Mon Nov 30 15:43:54 2009 +0000
@@ -37,8 +37,6 @@
 exception Timeout
 
 type dev_event =
-       | DevWorking of bool * string * string
-       | DevClosing of bool * string * string
        | DevClosed of bool * string * string
        | DevError of string * string * string
        | DevEject of string * string
2 files changed, 3 insertions(+), 17 deletions(-)
ocaml/xenops/xal.ml  |   18 +++---------------
ocaml/xenops/xal.mli |    2 --


Attachment: xen-api.hg-9.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.