From 8a223ad3ced39a21f12ed05f9d6b6adc39bb4ab3 Mon Sep 17 00:00:00 2001 From: des Date: Wed, 20 Jun 2001 16:08:45 +0000 Subject: [PATCH] Constify (silence warnings introduced by last commit to sys/module.h) --- sys/kern/kern_linker.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 2eb6a9f3a74a..097fabbd527a 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -960,7 +960,7 @@ modlist_lookup(const char *name, int ver) } static modlist_t -modlist_newmodule(char *modname, int version, linker_file_t container) +modlist_newmodule(const char *modname, int version, linker_file_t container) { modlist_t mod; @@ -979,7 +979,7 @@ modlist_newmodule(char *modname, int version, linker_file_t container) * This routine is cheap and nasty but will work for data pointers. */ static void * -linker_reloc_ptr(linker_file_t lf, void *offset) +linker_reloc_ptr(linker_file_t lf, const void *offset) { return lf->address + (uintptr_t)offset; } @@ -989,7 +989,7 @@ linker_reloc_ptr(linker_file_t lf, void *offset) */ static void linker_mdt_version(linker_file_t lf, struct mod_metadata *mp, - char **modname, int *version) + const char **modname, int *version) { struct mod_version *mvp; @@ -1006,7 +1006,7 @@ linker_mdt_version(linker_file_t lf, struct mod_metadata *mp, */ static void linker_mdt_depend(linker_file_t lf, struct mod_metadata *mp, - char **modname, struct mod_depend **verinfo) + const char **modname, struct mod_depend **verinfo) { if (modname) @@ -1020,7 +1020,7 @@ linker_addmodules(linker_file_t lf, struct mod_metadata **start, struct mod_metadata **stop, int preload) { struct mod_metadata *mp, **mdp; - char *modname; + const char *modname; int ver; for (mdp = start; mdp < stop; mdp++) { @@ -1048,7 +1048,7 @@ static void linker_preload(void* arg) { caddr_t modptr; - char *modname, *nmodname; + const char *modname, *nmodname; char *modtype; linker_file_t lf; linker_class_t lc; @@ -1380,7 +1380,7 @@ linker_load_dependancies(linker_file_t lf) struct mod_metadata **start, **stop, **mdp, **nmdp; struct mod_metadata *mp, *nmp; modlist_t mod; - char *modname, *nmodname; + const char *modname, *nmodname; int ver, error = 0, count; /*