Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jan 2016 22:14:37 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294689 - stable/10/sys/dev/rt
Message-ID:  <201601242214.u0OMEbp1029610@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sun Jan 24 22:14:37 2016
New Revision: 294689
URL: https://svnweb.freebsd.org/changeset/base/294689

Log:
  MFC r293105:
  
    Eliminate code for walking through the early static env data.  This code
    is called from a device attach routine, and thus cannot be called before
    the cutover from static to dynamic kernel env.

Modified:
  stable/10/sys/dev/rt/if_rt.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/rt/if_rt.c
==============================================================================
--- stable/10/sys/dev/rt/if_rt.c	Sun Jan 24 22:08:15 2016	(r294688)
+++ stable/10/sys/dev/rt/if_rt.c	Sun Jan 24 22:14:37 2016	(r294689)
@@ -176,20 +176,6 @@ macaddr_atoi(const char *str, uint8_t *m
 }
 
 #ifdef USE_GENERATED_MAC_ADDRESS
-static char *
-kernenv_next(char *cp)
-{
-
-	if (cp != NULL) {
-		while (*cp != 0)
-			cp++;
-		cp++;
-		if (*cp == 0)
-			cp = NULL;
-	}
-	return (cp);
-}
-
 /*
  * generate_mac(uin8_t *mac)
  * This is MAC address generator for cases when real device MAC address
@@ -208,14 +194,8 @@ generate_mac(uint8_t *mac)
 	uint32_t crc = 0xffffffff;
 
 	/* Generate CRC32 on kenv */
-	if (dynamic_kenv) {
-		for (cp = kenvp[0]; cp != NULL; cp = kenvp[++i]) {
-			crc = calculate_crc32c(crc, cp, strlen(cp) + 1);
-		}
-	} else {
-		for (cp = kern_envp; cp != NULL; cp = kernenv_next(cp)) {
-			crc = calculate_crc32c(crc, cp, strlen(cp) + 1);
-		}
+	for (cp = kenvp[0]; cp != NULL; cp = kenvp[++i]) {
+		crc = calculate_crc32c(crc, cp, strlen(cp) + 1);
 	}
 	crc = ~crc;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601242214.u0OMEbp1029610>