]> xenbits.xensource.com Git - xenclient/toolstack.git/commitdiff
xenops army knife: ignore the device return value with a type, and don't return a...
authorVincent Hanquez <vincent.hanquez@eu.citrix.com>
Sat, 9 May 2009 08:57:59 +0000 (09:57 +0100)
committerVincent Hanquez <vincent.hanquez@eu.citrix.com>
Sat, 9 May 2009 08:57:59 +0000 (09:57 +0100)
xenvm/xenops.ml

index 1d385768db625e3d1d8402cda22a3af3fafd2b6b..992424b0dc1c8081512cf7a00e27b7c0c72e48eb 100644 (file)
@@ -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 ();