WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 9 of 9] CA-31529: Remove the concept of an 'interesting

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] [PATCH 9 of 9] CA-31529: Remove the concept of an 'interesting_device_event' now that all events are 'interesting' (the predicate 'interesting_device_event' = \_.true)
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 30 Nov 2009 15:45:56 +0000
Delivery-date: Mon, 30 Nov 2009 07:44:32 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1259595947@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259595839 0
# Node ID 4fb239024d9fead6e215dbaf046f8bb89030892d
# Parent  79d2da9328135ea8875e8871505a23193ae0f944
CA-31529: Remove the concept of an 'interesting_device_event' now that all 
events are 'interesting' (the predicate 'interesting_device_event' = \_.true)

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

diff -r 79d2da932813 -r 4fb239024d9f ocaml/xapi/events.ml
--- a/ocaml/xapi/events.ml      Mon Nov 30 15:43:58 2009 +0000
+++ b/ocaml/xapi/events.ml      Mon Nov 30 15:43:59 2009 +0000
@@ -398,23 +398,10 @@
     || deferred_queue description deferred_work_item
   in ()
 
-(* Used to pre-filter the device events we care about from lots of 
uninteresting ones *)
-let interesting_device_event = function
-  | Xal.HotplugChanged(_, _, _) 
-  | Xal.DevShutdownDone(_, _)
-  | Xal.DevThread(_, _) 
-  | Xal.DevEject(_)
-  | Xal.ChangeRtc(_, _)
-  | Xal.Message(_, _, _, _)
-  | Xal.ChangeUncooperative _ -> true
-  | _ -> false
-
 let callback_devices ctx domid dev_event = 
   let dev_event_string = Xal.string_of_dev_event dev_event in
-  let interesting = interesting_device_event dev_event in
-  debug "VM (domid: %d) %s device_event = %s" domid (if interesting then 
"interesting" else "uninteresting") dev_event_string;
-  if interesting
-  then Helpers.log_exn_continue (Printf.sprintf "callback_devices (domid: %d) 
device_event = %s" domid dev_event_string)
+  debug "VM (domid: %d) device_event = %s" domid dev_event_string;
+  Helpers.log_exn_continue (Printf.sprintf "callback_devices (domid: %d) 
device_event = %s" domid dev_event_string)
     (fun () ->
        Server_helpers.exec_with_new_task (Printf.sprintf "VM (domid: %d) 
device_event = %s" domid dev_event_string)
         (fun __context -> 
1 file changed, 2 insertions(+), 15 deletions(-)
ocaml/xapi/events.ml |   17 ++---------------


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

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