Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


Revised check for already-launched VM
[palacios.git] / palacios / src / devices / ne2k.c
index 3c8fa06..420bc79 100644 (file)
@@ -1088,7 +1088,8 @@ static int ne2k_pci_read(struct guest_info * core,
 
 }
 
-static int pci_config_update(uint_t reg_num, 
+static int pci_config_update(struct pci_device * pci_dev,
+                        uint32_t reg_num,
                             void * src, 
                             uint_t length,
                             void * private_data) {
@@ -1217,6 +1218,12 @@ static int ne2k_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     char * macstr = v3_cfg_val(cfg, "mac");
 
     nic_state  = (struct ne2k_state *)V3_Malloc(sizeof(struct ne2k_state));
+
+    if (!nic_state) {
+       PrintError("Cannot allocate in init\n");
+       return -1;
+    }
+
     memset(nic_state, 0, sizeof(struct ne2k_state));
 
     nic_state->pci_bus = pci_bus;