From: Vincent Hanquez Date: Sat, 9 May 2009 08:57:59 +0000 (+0100) Subject: xenops army knife: ignore the device return value with a type, and don't return a... X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=386505e6fe9de3be0011805ff27b54e6c2b7b978;p=xenclient%2Ftoolstack.git xenops army knife: ignore the device return value with a type, and don't return a partially apply function. --- diff --git a/xenvm/xenops.ml b/xenvm/xenops.ml index 1d38576..992424b 100644 --- a/xenvm/xenops.ml +++ b/xenvm/xenops.ml @@ -223,8 +223,11 @@ let add_vbd ~xs ~hvm ~domid ~virtpath ~phystype ~physpath ~dev_type ~mode ~backe let phystype = Device.Vbd.physty_of_string phystype in let dev_type = Device.Vbd.devty_of_string dev_type in - Device.Vbd.add ~xs ~hvm ~mode:(Device.Vbd.mode_of_string mode) - ~phystype ~physpath ~virtpath ~dev_type ~backend_domid domid + let (_: Device_common.device) = + Device.Vbd.add ~xs ~hvm ~mode:(Device.Vbd.mode_of_string mode) + ~phystype ~physpath ~virtpath ~dev_type ~backend_domid + ~unpluggable:false ~diskinfo_pt:false domid in + () let find_device ~xs (frontend: endpoint) (backend: endpoint) = let all = list_devices_between ~xs backend.domid frontend.domid in @@ -242,7 +245,8 @@ let del_vbd ~xs ~domid ~backend_domid ~virtpath ~phystype = Device.clean_shutdown ~xs device let add_vif ~xs ~domid ~netty ~devid ~mac ~backend_domid = - ignore(Device.Vif.add ~xs ~devid ~netty ~mac ~backend_domid domid) + let (_: Device_common.device) = Device.Vif.add ~xs ~devid ~netty ~mac ~backend_domid domid in + () let del_vif ~xs ~domid ~backend_domid ~devid = let frontend = { domid = domid; kind = Vif; devid = devid } in @@ -707,7 +711,7 @@ let _ = assert_domid (); with_xc_and_xs (fun xc xs -> let hvm = is_domain_hvm xc domid in - ignore(add_vbd ~xs ~hvm ~domid ~virtpath ~phystype ~physpath ~dev_type ~unpluggable:false ~diskinfo_pt:false ~mode ~backend_domid) + add_vbd ~xs ~hvm ~domid ~virtpath ~phystype ~physpath ~dev_type ~mode ~backend_domid ) | "del_vbd" -> assert_domid ();