diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-01 22:24:07 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-01 22:24:07 +0000 |
commit | 32e7be7043b962f004dc412716243fb80febf603 (patch) | |
tree | 0693b34165ff1c9f70d31ae39190d546ba9042af /sbin/geom/core | |
parent | 4c22eb57f3bf7fd4420afc901b4a0d0997b5e259 (diff) | |
download | src-32e7be7043b962f004dc412716243fb80febf603.tar.gz src-32e7be7043b962f004dc412716243fb80febf603.zip |
After changing LIBDIR to SHLIBDIR, because of dependencies problems,
new problem shows up: symblic links (<libname>.so) are created under
/usr/lib/ now, instead of under /lib/geom/ where geom(8) looks for them.
Introduce a workaround to fix this by teaching geom(8) to open libraries
via /lib/geom/<libname>.so.<major_number> instead of /lib/geom/<libname>.so.
Notes
Notes:
svn path=/head/; revision=132982
Diffstat (limited to 'sbin/geom/core')
-rw-r--r-- | sbin/geom/core/Makefile | 2 | ||||
-rw-r--r-- | sbin/geom/core/geom.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sbin/geom/core/Makefile b/sbin/geom/core/Makefile index 053dbd0da3dd..6ee6c39c82b3 100644 --- a/sbin/geom/core/Makefile +++ b/sbin/geom/core/Makefile @@ -6,7 +6,7 @@ PROG= geom MAN= geom.8 SRCS= geom.c subr.c -CFLAGS+= -DCLASSDIR=\"${CLASSDIR}\" +CFLAGS+= -DCLASS_DIR=\"${CLASS_DIR}\" -DCLASS_MAJOR=${CLASS_MAJOR} CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/.. DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c index 12959a335c80..dcc663139005 100644 --- a/sbin/geom/core/geom.c +++ b/sbin/geom/core/geom.c @@ -438,7 +438,8 @@ load_library(void) uint32_t *lib_version; void *dlh; - snprintf(path, sizeof(path), "%s/geom_%s.so", CLASSDIR, class_name); + snprintf(path, sizeof(path), "%s/geom_%s.so.%u", CLASS_DIR, class_name, + CLASS_MAJOR); dlh = dlopen(path, RTLD_NOW); if (dlh == NULL) { #if 0 |