From owner-svn-src-head@FreeBSD.ORG Sun Mar 9 13:19:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F3E959; Sun, 9 Mar 2014 13:19:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C75458BB; Sun, 9 Mar 2014 13:19:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s29DJb2E055384; Sun, 9 Mar 2014 13:19:37 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s29DJbIN055383; Sun, 9 Mar 2014 13:19:37 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201403091319.s29DJbIN055383@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 9 Mar 2014 13:19:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262946 - head/sbin/kldconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 13:19:38 -0000 Author: jilles Date: Sun Mar 9 13:19:37 2014 New Revision: 262946 URL: http://svnweb.freebsd.org/changeset/base/262946 Log: kldconfig: Remove some code for compatibility with FreeBSD 4.x. Verified using md5(1). Modified: head/sbin/kldconfig/kldconfig.c Modified: head/sbin/kldconfig/kldconfig.c ============================================================================== --- head/sbin/kldconfig/kldconfig.c Sun Mar 9 07:45:59 2014 (r262945) +++ head/sbin/kldconfig/kldconfig.c Sun Mar 9 13:19:37 2014 (r262946) @@ -40,15 +40,6 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(__FreeBSD_version) -#if __FreeBSD_version < 500000 -#define NEED_SLASHTERM -#endif /* < 500000 */ -#else /* defined(__FreeBSD_version) */ -/* just in case.. */ -#define NEED_SLASHTERM -#endif /* defined(__FreeBSD_version) */ - /* the default sysctl name */ #define PATHCTL "kern.module_path" @@ -163,18 +154,9 @@ addpath(struct pathhead *pathq, char *pa strlcpy(pathbuf, path, sizeof(pathbuf)); len = strlen(pathbuf); -#ifdef NEED_SLASHTERM - /* slash-terminate, because the kernel linker said so. */ - if ((len == 0) || (pathbuf[len-1] != '/')) { - if (len == sizeof(pathbuf) - 1) - errx(1, "path too long: %s", pathbuf); - pathbuf[len] = '/'; - } -#else /* NEED_SLASHTERM */ /* remove a terminating slash if present */ if ((len > 0) && (pathbuf[len-1] == '/')) pathbuf[--len] = '\0'; -#endif /* NEED_SLASHTERM */ /* is it already in there? */ TAILQ_FOREACH(pe, pathq, next) @@ -219,18 +201,9 @@ rempath(struct pathhead *pathq, char *pa strlcpy(pathbuf, path, sizeof(pathbuf)); len = strlen(pathbuf); -#ifdef NEED_SLASHTERM - /* slash-terminate, because the kernel linker said so. */ - if ((len == 0) || (pathbuf[len-1] != '/')) { - if (len == sizeof(pathbuf) - 1) - errx(1, "path too long: %s", pathbuf); - pathbuf[len] = '/'; - } -#else /* NEED_SLASHTERM */ /* remove a terminating slash if present */ if ((len > 0) && (pathbuf[len-1] == '/')) pathbuf[--len] = '\0'; -#endif /* NEED_SLASHTERM */ /* Is it in there? */ TAILQ_FOREACH(pe, pathq, next)