AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I$(top_srcdir)/libkmod \
- -DROOTPREFIX=\""$(rootprefix)"\" \
-DSYSCONFDIR=\""$(sysconfdir)"\" \
-DLIBEXECDIR=\""$(libexecdir)"\" \
${zlib_CFLAGS}
# --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])
======
prefix: ${prefix}
- rootprefix: ${rootprefix}
sysconfdir: ${sysconfdir}
libdir: ${libdir}
rootlibdir: ${rootlibdir}
static const char *default_config_paths[] = {
SYSCONFDIR "/modprobe.d",
"/run/modprobe.d",
- ROOTPREFIX "/lib/modprobe.d",
+ "/lib/modprobe.d",
NULL
};
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)
{
/**
* 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.
static const char *default_cfg_paths[] = {
"/run/depmod.d",
SYSCONFDIR "/depmod.d",
- ROOTPREFIX "/lib/depmod.d",
+ "/lib/depmod.d",
NULL
};
}
cfg.dirnamelen = snprintf(cfg.dirname, PATH_MAX,
- "%s" ROOTPREFIX "/lib/modules/%s",
+ "%s/lib/modules/%s",
root == NULL ? "" : root, cfg.kversion);
if (optind == argc)
"\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);
}
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;
}
"\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"
kversion = u.release;
}
snprintf(dirname_buf, sizeof(dirname_buf),
- "%s" ROOTPREFIX "/lib/modules/%s", root,
+ "%s/lib/modules/%s", root,
kversion);
dirname = dirname_buf;
}