Changeset 31555 in vbox
- Timestamp:
- Aug 11, 2010 7:14:37 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/VBoxNetAdp-linux.c
r28800 r31555 177 177 int err; 178 178 179 memcpy(pNetDev->dev_addr, pMACAddress, ETH_ALEN); 180 Log2(("vboxNetAdpOsCreate: pNetDev->dev_addr = %.6Rhxd\n", pNetDev->dev_addr)); 181 err = register_netdev(pNetDev); 182 if (!err) 179 if (pNetDev->dev_addr) 183 180 { 184 strncpy(pThis->szName, pNetDev->name, VBOXNETADP_MAX_NAME_LEN); 185 pThis->u.s.pNetDev = pNetDev; 186 Log2(("vboxNetAdpOsCreate: pThis=%p pThis->szName = %p\n", pThis, pThis->szName)); 187 return VINF_SUCCESS; 181 memcpy(pNetDev->dev_addr, pMACAddress, ETH_ALEN); 182 Log2(("vboxNetAdpOsCreate: pNetDev->dev_addr = %.6Rhxd\n", pNetDev->dev_addr)); 183 err = register_netdev(pNetDev); 184 if (!err) 185 { 186 strncpy(pThis->szName, pNetDev->name, VBOXNETADP_MAX_NAME_LEN); 187 pThis->u.s.pNetDev = pNetDev; 188 Log2(("vboxNetAdpOsCreate: pThis=%p pThis->szName = %p\n", pThis, pThis->szName)); 189 return VINF_SUCCESS; 190 } 191 } 192 else 193 { 194 LogRel(("VBoxNetAdp: failed to set MAC address (dev->dev_addr == NULL)\n")); 195 err = EFAULT; 188 196 } 189 197 free_netdev(pNetDev); … … 361 369 } 362 370 else 363 LogRel(("VBoxNet Flt: failed to initialize IPRT (rc=%d)\n", rc));371 LogRel(("VBoxNetAdp: failed to initialize IPRT (rc=%d)\n", rc)); 364 372 365 373 return -RTErrConvertToErrno(rc);
Note:
See TracChangeset
for help on using the changeset viewer.