From: Tomasz Wroblewski Date: Thu, 28 Jan 2010 17:59:39 +0000 (+0000) Subject: [xenvm] Don't pass wireless nics for qemu to emulate X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;p=xenclient%2Ftoolstack.git [xenvm] Don't pass wireless nics for qemu to emulate --- diff --git a/xenops/device.ml b/xenops/device.ml index 7831090..f14739e 100644 --- a/xenops/device.ml +++ b/xenops/device.ml @@ -1320,7 +1320,7 @@ type info = { serial: string; vcpus: int; usb: string list; - nics: (string * string * string option) list; + nics: (string * string * string option * bool) list; acpi: bool; disp: disp_opt; pci_emulations: string list; @@ -1384,7 +1384,8 @@ let __start ~xs ~dmpath ~restore ?(timeout=qemu_dm_ready_timeout) info domid = (* qemu need a different id for every vlan, or things get very bad *) let vlan_id = ref 0 in let if_number = ref 0 in - let nics' = List.map (fun (mac, bridge, model) -> + let nics' = List.filter (fun (_,_,_,wireless) -> wireless = false) info.nics in + let nics' = List.map (fun (mac, bridge, model, _) -> let modelstr = match model with | None -> "rtl8139" @@ -1396,7 +1397,7 @@ let __start ~xs ~dmpath ~restore ?(timeout=qemu_dm_ready_timeout) info domid = incr if_number; incr vlan_id; r - ) info.nics in + ) nics' in let qemu_pid_path = xs.Xs.getdomainpath domid ^ "/qemu-pid" in if info.power_mgmt <> 0 then begin diff --git a/xenops/device.mli b/xenops/device.mli index baf2af0..90b900d 100644 --- a/xenops/device.mli +++ b/xenops/device.mli @@ -180,7 +180,7 @@ sig serial: string; vcpus: int; usb: string list; - nics: (string * string * string option) list; + nics: (string * string * string option * bool) list; acpi: bool; disp: disp_opt; pci_emulations: string list; diff --git a/xenvm/vmact.ml b/xenvm/vmact.ml index 18ce103..e12cfef 100644 --- a/xenvm/vmact.ml +++ b/xenvm/vmact.ml @@ -209,7 +209,7 @@ let get_pcis cfg = let dm_info_of_cfg cfg = let nics = get_nics cfg in - let nics = List.map (fun nic -> nic.nic_mac, nic.nic_bridge, if nic.nic_model="" then None else Some nic.nic_model) nics in + let nics = List.map (fun nic -> nic.nic_mac, nic.nic_bridge, (if nic.nic_model="" then None else Some nic.nic_model), nic.nic_wireless) nics in let extrahvm = (match cfg.cdrom_pt with