aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/kldconfig
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
commit3b8f08459569bf0faa21473e5cec2491e95c9349 (patch)
tree80f45dd81ca716bcd7ca9674581e1fc40b93cd34 /sbin/kldconfig
parent9d2ab4a62d6733c45958627ac113bdbd818d1e2a (diff)
parentb2ba55951383498f252746f618d513139da06e8e (diff)
downloadsrc-3b8f08459569bf0faa21473e5cec2491e95c9349.tar.gz
src-3b8f08459569bf0faa21473e5cec2491e95c9349.zip
Merge head
Notes
Notes: svn path=/projects/bmake/; revision=265044
Diffstat (limited to 'sbin/kldconfig')
-rw-r--r--sbin/kldconfig/kldconfig.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sbin/kldconfig/kldconfig.c b/sbin/kldconfig/kldconfig.c
index 403251d2a18f..30dc876ab07b 100644
--- a/sbin/kldconfig/kldconfig.c
+++ b/sbin/kldconfig/kldconfig.c
@@ -40,15 +40,6 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <unistd.h>
-#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 *path, int force, int insert)
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 *path, int force, int insert __unused)
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)