ofw_net.c (215437) | ofw_net.c (229403) |
---|---|
1/*- 2 * Copyright (c) 2000-2001 Benno Rice 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2000-2001 Benno Rice 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/boot/ofw/libofw/ofw_net.c 215437 2010-11-17 19:31:48Z andreast $"); | 28__FBSDID("$FreeBSD: head/sys/boot/ofw/libofw/ofw_net.c 229403 2012-01-03 18:51:58Z ed $"); |
29 30#include <sys/param.h> 31#include <sys/types.h> 32#include <sys/socket.h> 33 34#include <net/if.h> 35#include <netinet/in.h> 36#include <netinet/in_systm.h> --- 143 unchanged lines hidden (view full) --- 180ofwn_init(struct iodesc *desc, void *machdep_hint) 181{ 182 phandle_t netdev; 183 char path[64]; 184 char *ch; 185 int pathlen; 186 187 pathlen = OF_getprop(chosen, "bootpath", path, 64); | 29 30#include <sys/param.h> 31#include <sys/types.h> 32#include <sys/socket.h> 33 34#include <net/if.h> 35#include <netinet/in.h> 36#include <netinet/in_systm.h> --- 143 unchanged lines hidden (view full) --- 180ofwn_init(struct iodesc *desc, void *machdep_hint) 181{ 182 phandle_t netdev; 183 char path[64]; 184 char *ch; 185 int pathlen; 186 187 pathlen = OF_getprop(chosen, "bootpath", path, 64); |
188 if ((ch = index(path, ':')) != NULL) | 188 if ((ch = strchr(path, ':')) != NULL) |
189 *ch = '\0'; 190 netdev = OF_finddevice(path); 191#ifdef __sparc64__ 192 if (OF_getprop(netdev, "mac-address", desc->myea, 6) == -1) 193#else 194 if (OF_getprop(netdev, "local-mac-address", desc->myea, 6) == -1) 195#endif 196 goto punt; --- 64 unchanged lines hidden --- | 189 *ch = '\0'; 190 netdev = OF_finddevice(path); 191#ifdef __sparc64__ 192 if (OF_getprop(netdev, "mac-address", desc->myea, 6) == -1) 193#else 194 if (OF_getprop(netdev, "local-mac-address", desc->myea, 6) == -1) 195#endif 196 goto punt; --- 64 unchanged lines hidden --- |