summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/bootstrap.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-09-11 01:09:24 +0000
committerpeter <peter@FreeBSD.org>2001-09-11 01:09:24 +0000
commit808991de7cecc9e774ffe5031e29362207e75564 (patch)
tree7b0e7fbc20bd6b09f4224a1d0187a77c9f747184 /sys/boot/common/bootstrap.h
parentf07a058a30186a596af1595909ea89573a1a794f (diff)
downloadFreeBSD-src-808991de7cecc9e774ffe5031e29362207e75564.zip
FreeBSD-src-808991de7cecc9e774ffe5031e29362207e75564.tar.gz
Implement the long-awaited module->file cache database. A userland
tool (kldxref(8)) keeps a cache of what modules and versions are inside what .ko files. I have tested this on both Alpha and i386. Submitted by: bp
Diffstat (limited to 'sys/boot/common/bootstrap.h')
-rw-r--r--sys/boot/common/bootstrap.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index 11085eb..1248fb0 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -173,10 +173,12 @@ struct file_metadata
};
struct preloaded_file;
+struct mod_depend;
struct kernel_module
{
char *m_name; /* module name */
+ int m_version; /* module version */
/* char *m_args;*/ /* arguments for the module */
struct preloaded_file *m_fp;
struct kernel_module *m_next;
@@ -215,15 +217,16 @@ struct file_format
extern struct file_format *file_formats[]; /* supplied by consumer */
extern struct preloaded_file *preloaded_files;
-int mod_load(char *name, int argc, char *argv[]);
+int mod_load(char *name, struct mod_depend *verinfo, int argc, char *argv[]);
int mod_loadobj(char *type, char *name);
+int mod_loadkld(const char *name, int argc, char *argv[]);
struct preloaded_file *file_alloc(void);
struct preloaded_file *file_findfile(char *name, char *type);
struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type);
void file_discard(struct preloaded_file *fp);
void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p);
-int file_addmodule(struct preloaded_file *fp, char *modname,
+int file_addmodule(struct preloaded_file *fp, char *modname, int version,
struct kernel_module **newmp);
OpenPOWER on IntegriCloud