efinet.c (256281) | efinet.c (271135) |
---|---|
1/*- 2 * Copyright (c) 2001 Doug Rabson 3 * Copyright (c) 2002, 2006 Marcel Moolenaar 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001 Doug Rabson 3 * Copyright (c) 2002, 2006 Marcel Moolenaar 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/10/sys/boot/efi/libefi/efinet.c 217067 2011-01-06 20:50:16Z marcel $"); | 29__FBSDID("$FreeBSD: stable/10/sys/boot/efi/libefi/efinet.c 271135 2014-09-04 21:01:10Z emaste $"); |
30 31#include <sys/param.h> 32#include <netinet/in.h> 33#include <netinet/in_systm.h> 34 35#include <stand.h> 36#include <net.h> 37#include <netif.h> --- 231 unchanged lines hidden (view full) --- 269 status = BS->LocateHandle(ByProtocol, &sn_guid, 0, &sz, 270 handles); 271 if (EFI_ERROR(status)) 272 free(handles); 273 } 274 if (EFI_ERROR(status)) 275 return (efi_status_to_errno(status)); 276 nifs = sz / sizeof(EFI_HANDLE); | 30 31#include <sys/param.h> 32#include <netinet/in.h> 33#include <netinet/in_systm.h> 34 35#include <stand.h> 36#include <net.h> 37#include <netif.h> --- 231 unchanged lines hidden (view full) --- 269 status = BS->LocateHandle(ByProtocol, &sn_guid, 0, &sz, 270 handles); 271 if (EFI_ERROR(status)) 272 free(handles); 273 } 274 if (EFI_ERROR(status)) 275 return (efi_status_to_errno(status)); 276 nifs = sz / sizeof(EFI_HANDLE); |
277 err = efi_register_handles(&efinet_dev, handles, nifs); | 277 err = efi_register_handles(&efinet_dev, handles, NULL, nifs); |
278 free(handles); 279 if (err != 0) 280 return (err); 281 282 efinetif.netif_nifs = nifs; 283 efinetif.netif_ifs = calloc(nifs, sizeof(struct netif_dif)); 284 285 stats = calloc(nifs, sizeof(struct netif_stats)); --- 25 unchanged lines hidden --- | 278 free(handles); 279 if (err != 0) 280 return (err); 281 282 efinetif.netif_nifs = nifs; 283 efinetif.netif_ifs = calloc(nifs, sizeof(struct netif_dif)); 284 285 stats = calloc(nifs, sizeof(struct netif_stats)); --- 25 unchanged lines hidden --- |