From owner-svn-src-stable@freebsd.org Sun Jan 24 22:14:38 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 718D475C5; Sun, 24 Jan 2016 22:14:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BE9ACBE; Sun, 24 Jan 2016 22:14:38 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0OMEb6w029611; Sun, 24 Jan 2016 22:14:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0OMEbp1029610; Sun, 24 Jan 2016 22:14:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201601242214.u0OMEbp1029610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Jan 2016 22:14:37 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2016 22:14:38 -0000 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;