This is a broken option that only leads to misery and incompatabilities with other systems. Kbuild doesn't come close to supporting this option with several targets simply failing without hacky fixes. Simply the remove the option and all traces of it, as it doesn't make sense in today's world. --- I suspect that if anyone was actually using this option, they would have already posted here, expressing their frustration with it. I guess I'll be the first. Makefile.am | 1 - configure.ac | 6 ------ libkmod/libkmod.c | 11 +++++------ tools/depmod.c | 4 ++-- tools/modinfo.c | 4 ++-- tools/modprobe.c | 4 ++-- 6 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8e8bcc0..56f00c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,6 @@ AM_MAKEFLAGS = --no-print-directory AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ -I$(top_srcdir)/libkmod \ - -DROOTPREFIX=\""$(rootprefix)"\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ ${zlib_CFLAGS} diff --git a/configure.ac b/configure.ac index 901780b..2e9124c 100644 --- a/configure.ac +++ b/configure.ac @@ -49,11 +49,6 @@ AC_CHECK_MEMBERS([struct stat.st_mtim], [], [], [#include <sys/stat.h>]) # --with- ##################################################################### -AC_ARG_WITH([rootprefix], - AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), - [], [with_rootprefix=""]) -AC_SUBST([rootprefix], [$with_rootprefix]) - AC_ARG_WITH([rootlibdir], AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), [], [with_rootlibdir=$libdir]) @@ -190,7 +185,6 @@ AC_MSG_RESULT([ ====== prefix: ${prefix} - rootprefix: ${rootprefix} sysconfdir: ${sysconfdir} libdir: ${libdir} rootlibdir: ${rootlibdir} diff --git a/libkmod/libkmod.c b/libkmod/libkmod.c index 14a8f1f..f898438 100644 --- a/libkmod/libkmod.c +++ b/libkmod/libkmod.c @@ -61,7 +61,7 @@ static struct _index_files { static const char *default_config_paths[] = { SYSCONFDIR "/modprobe.d", "/run/modprobe.d", - ROOTPREFIX "/lib/modprobe.d", + "/lib/modprobe.d", NULL }; @@ -195,7 +195,7 @@ static int log_priority(const char *priority) return 0; } -static const char *dirname_default_prefix = ROOTPREFIX "/lib/modules"; +static const char *dirname_default_prefix = "/lib/modules"; static char *get_kernel_release(const char *dirname) { @@ -217,16 +217,15 @@ static char *get_kernel_release(const char *dirname) /** * kmod_new: * @dirname: what to consider as linux module's directory, if NULL - * defaults to $rootprefix/lib/modules/`uname -r`. If it's relative, + * defaults to /lib/modules/`uname -r`. If it's relative, * it's treated as relative to current the current working * directory. Otherwise, give an absolute dirname. * @config_paths: ordered array of paths (directories or files) where * to load from user-defined configuration parameters such as * alias, blacklists, commands (install, remove). If * NULL defaults to /run/modprobe.d, /etc/modprobe.d and - * $rootprefix/lib/modprobe.d. Give an empty vector if - * configuration should not be read. This array must be null - * terminated. + * /lib/modprobe.d. Give an empty vector if configuration should + * not be read. This array must be null terminated. * * Create kmod library context. This reads the kmod configuration * and fills in the default values. diff --git a/tools/depmod.c b/tools/depmod.c index 834bb05..0bf2dea 100644 --- a/tools/depmod.c +++ b/tools/depmod.c @@ -57,7 +57,7 @@ static const char CFG_BUILTIN_KEY[] = "built-in"; static const char *default_cfg_paths[] = { "/run/depmod.d", SYSCONFDIR "/depmod.d", - ROOTPREFIX "/lib/depmod.d", + "/lib/depmod.d", NULL }; @@ -2649,7 +2649,7 @@ static int do_depmod(int argc, char *argv[]) } cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX, - "%s" ROOTPREFIX "/lib/modules/%s", + "%s/lib/modules/%s", root == NULL ? "" : root, cfg.kversion); if (optind == argc) diff --git a/tools/modinfo.c b/tools/modinfo.c index b506f10..dc41997 100644 --- a/tools/modinfo.c +++ b/tools/modinfo.c @@ -339,7 +339,7 @@ static void help(const char *progname) "\t-0, --null Use \\0 instead of \\n\n" "\t-F, --field=FIELD Print only provided FIELD\n" "\t-k, --set-version=VERSION Use VERSION instead of `uname -r`\n" - "\t-b, --basedir=DIR Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n" + "\t-b, --basedir=DIR Use DIR as filesystem root for /lib/modules\n" "\t-V, --version Show version\n" "\t-h, --help Show this help\n", progname); @@ -439,7 +439,7 @@ static int do_modinfo(int argc, char *argv[]) } kversion = u.release; } - snprintf(dirname_buf, sizeof(dirname_buf), "%s" ROOTPREFIX "/lib/modules/%s", + snprintf(dirname_buf, sizeof(dirname_buf), "%s/lib/modules/%s", root, kversion); dirname = dirname_buf; } diff --git a/tools/modprobe.c b/tools/modprobe.c index b108112..b8a6415 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -128,7 +128,7 @@ static void help(const char *progname) "\t-n, --show Same as --dry-run\n" "\t-C, --config=FILE Use FILE instead of default search paths\n" - "\t-d, --dirname=DIR Use DIR as filesystem root for " ROOTPREFIX "/lib/modules\n" + "\t-d, --dirname=DIR Use DIR as filesystem root for /lib/modules\n" "\t-S, --set-version=VERSION Use VERSION instead of `uname -r`\n" "\t-s, --syslog print to syslog, not stderr\n" @@ -979,7 +979,7 @@ static int do_modprobe(int argc, char **orig_argv) kversion = u.release; } snprintf(dirname_buf, sizeof(dirname_buf), - "%s" ROOTPREFIX "/lib/modules/%s", root, + "%s/lib/modules/%s", root, kversion); dirname = dirname_buf; } -- 1.7.12.1 -- To unsubscribe from this list: send the line "unsubscribe linux-modules" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html