FreeBSD/sys/boot/common/dev_net.c
/*
 * Strip the server's address off of the rootpath if present and return it in
 * network byte order, leaving just the pathname part in the global rootpath.
 */
Strip the server's address off of the rootpath if present and return it in
network byte order, leaving just the pathname part in the global rootpath.
Strip the server ' s address off of the rootpath if present and return it in network byte order leaving just the pathname part in the global rootpath .
uint32_t
net_parse_rootpath()
{
	int i;
	n_long addr = INADDR_NONE;
	for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++)
		if (rootpath[i] == ':')
			break;
	if (i && i != FNAME_SIZE && rootpath[i] == ':') {
		rootpath[i++] = '\0';
		addr = inet_addr(&rootpath[0]);
		bcopy(&rootpath[i], rootpath, strlen(&rootpath[i])+1);
	}
	return (addr);
}
uint32_t net_parse_rootpath ( ) { int i ; n_long addr = INADDR_NONE ; for ( i = 0 ; rootpath [ i ] != ' \0 ' && i < FNAME_SIZE ; i ++ ) if ( rootpath [ i ] == ' ' ) break ; if ( i && i != FNAME_SIZE && rootpath [ i ] == ' ' ) { rootpath [ i ++ ] = ' \0 ' ; addr = inet_addr ( & rootpath [ 0 ] ) ; bcopy ( & rootpath [ i ] , rootpath , strlen ( & rootpath [ i ] ) + 1 ) ; } return ( addr ) ; }
Strip the server's address off of the rootpath if present and return it in
 network byte order, leaving just the pathname part in the global rootpath.
Strip the server ' s address off of the rootpath if present and return it in network byte order leaving just the pathname part in the global rootpath .