From owner-freebsd-bugs Sat Nov 7 09:10:00 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA15823 for freebsd-bugs-outgoing; Sat, 7 Nov 1998 09:10:00 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA15815 for ; Sat, 7 Nov 1998 09:09:59 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id JAA20299; Sat, 7 Nov 1998 09:10:01 -0800 (PST) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA15342; Sat, 7 Nov 1998 09:03:54 -0800 (PST) (envelope-from nobody) Message-Id: <199811071703.JAA15342@hub.freebsd.org> Date: Sat, 7 Nov 1998 09:03:54 -0800 (PST) From: rv@fore.com To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: kern/8589: incorrect spelling for "dependency" and "dependencies" in kernel code Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8589 >Category: kern >Synopsis: incorrect spelling for "dependency" and "dependencies" in kernel code >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 7 09:10:01 PST 1998 >Last-Modified: >Originator: Rajesh Vaidheeswarran >Organization: >Release: 3.0-current (cvsup from 3.0-RELEASE) >Environment: FreeBSD freebsd.eng.fore.com 3.0-RELEASE FreeBSD 3.0-RELEASE #2: Sun Nov 1 18:06:32 EST 1998 bash@freebsd.eng.fore.com:/usr/src/sys/compile/FB30 i386 >Description: The following files have incorrect spelling for dependenc(y|ies) boot/common/module.c kern/kern_linker.c kern/link_aout.c kern/link_elf.c sys/linker.h According to webster there is no such word as 'dependancy' or 'dependancies'. Kind of gets hard to grep sources with incorrect spelling.. of course, code works just fine :) rv>~/bin/webster dependancies No entries found that match your query. Here is a list of similar words. 4 words found. 1. dependances 2. dependences 3. Dependencies 4. dependencies rv>~/bin/webster dependancy No entries found that match your query. Here is a list of similar words. 4 words found. 1. dependance 2. dependence 3. Dependency 4. dependency >How-To-Repeat: look at the files... >Fix: *** boot/common/module.c Fri Oct 9 19:12:34 1998 --- boot/common/module.c.new Sat Nov 7 11:56:05 1998 *************** *** 169,175 **** /* * We've been asked to load (name) and give it (argc),(argv). * Start by trying to load it, and then attempt to load all of its ! * dependancies. If we fail at any point, throw them all away and * fail the entire load. * * XXX if a depended-on module requires arguments, it must be loaded --- 169,175 ---- /* * We've been asked to load (name) and give it (argc),(argv). * Start by trying to load it, and then attempt to load all of its ! * dependencies. If we fail at any point, throw them all away and * fail the entire load. * * XXX if a depended-on module requires arguments, it must be loaded *************** *** 195,201 **** return(CMD_ERROR); /* ! * Look for dependancies. */ while ((dep_name = mod_searchdep(base_mod)) != NULL) { printf("loading required module '%s'\n", dep_name); --- 195,201 ---- return(CMD_ERROR); /* ! * Look for dependencies. */ while ((dep_name = mod_searchdep(base_mod)) != NULL) { printf("loading required module '%s'\n", dep_name); *************** *** 279,285 **** /* * Load the module (name), pass it (argc),(argv). ! * Don't do any dependancy checking. */ static struct loaded_module * mod_loadmodule(char *name, int argc, char *argv[]) --- 279,285 ---- /* * Load the module (name), pass it (argc),(argv). ! * Don't do any dependency checking. */ static struct loaded_module * mod_loadmodule(char *name, int argc, char *argv[]) *************** *** 331,337 **** /* * Search the modules from (mp) onwards, and return the name of the ! * first unresolved dependancy, or NULL if none were found. */ static char * mod_searchdep(struct loaded_module *mp) --- 331,337 ---- /* * Search the modules from (mp) onwards, and return the name of the ! * first unresolved dependency, or NULL if none were found. */ static char * mod_searchdep(struct loaded_module *mp) *************** *** 356,366 **** if (deps != NULL && deplen > 0) { ! /* Iterate over dependancies */ dindex = 0; while (dindex < deplen) { /* ! * Look for a module matching the dependancy; if we don't have it, * we need it. */ if ((dmp = mod_findmodule(&deps[dindex], NULL)) == NULL) --- 356,366 ---- if (deps != NULL && deplen > 0) { ! /* Iterate over dependencies */ dindex = 0; while (dindex < deplen) { /* ! * Look for a module matching the dependency; if we don't have it, * we need it. */ if ((dmp = mod_findmodule(&deps[dindex], NULL)) == NULL) *** kern/kern_linker.c Sat Nov 7 10:52:46 1998 --- kern/kern_linker.c.new Sat Nov 7 11:56:05 1998 *************** *** 365,371 **** } int ! linker_file_add_dependancy(linker_file_t file, linker_file_t dep) { linker_file_t* newdeps; --- 365,371 ---- } int ! linker_file_add_dependency(linker_file_t file, linker_file_t dep) { linker_file_t* newdeps; *************** *** 402,408 **** file->ops->symbol_values(file, sym, &symval); if (symval.value == 0) /* ! * For commons, first look them up in the dependancies and * only allocate space if not found there. */ common_size = symval.size; --- 402,408 ---- file->ops->symbol_values(file, sym, &symval); if (symval.value == 0) /* ! * For commons, first look them up in the dependencies and * only allocate space if not found there. */ common_size = symval.size; *************** *** 424,430 **** if (common_size > 0) { /* * This is a common symbol which was not found in the ! * dependancies. We maintain a simple common symbol table in * the file object. */ struct common_symbol* cp; --- 424,430 ---- if (common_size > 0) { /* * This is a common symbol which was not found in the ! * dependencies. We maintain a simple common symbol table in * the file object. */ struct common_symbol* cp; *** kern/link_aout.c Sat Nov 7 10:52:47 1998 --- kern/link_aout.c.new Sat Nov 7 11:56:05 1998 *************** *** 77,83 **** struct _dynamic* dynamic; /* Symbol table etc. */ } *aout_file_t; ! static int load_dependancies(linker_file_t lf); static int relocate_file(linker_file_t lf); /* --- 77,83 ---- struct _dynamic* dynamic; /* Symbol table etc. */ } *aout_file_t; ! static int load_dependencies(linker_file_t lf); static int relocate_file(linker_file_t lf); /* *************** *** 165,172 **** lf->address = af->address; lf->size = ehdr->a_text + ehdr->a_data + ehdr->a_bss; ! /* Try to load dependancies */ ! if (((error = load_dependancies(lf)) != 0) || ((error = relocate_file(lf)) != 0)) { linker_file_unload(lf); return(error); --- 165,172 ---- lf->address = af->address; lf->size = ehdr->a_text + ehdr->a_data + ehdr->a_bss; ! /* Try to load dependencies */ ! if (((error = load_dependencies(lf)) != 0) || ((error = relocate_file(lf)) != 0)) { linker_file_unload(lf); return(error); *************** *** 247,253 **** lf->address = af->address; lf->size = header.a_text + header.a_data + header.a_bss; ! if ((error = load_dependancies(lf)) != 0 || (error = relocate_file(lf)) != 0) { linker_file_unload(lf); goto out; --- 247,253 ---- lf->address = af->address; lf->size = header.a_text + header.a_data + header.a_bss; ! if ((error = load_dependencies(lf)) != 0 || (error = relocate_file(lf)) != 0) { linker_file_unload(lf); goto out; *************** *** 288,294 **** #define AOUT_RELOC(af, type, off) (type*) ((af)->address + (off)) static int ! load_dependancies(linker_file_t lf) { aout_file_t af = lf->priv; linker_file_t lfdep; --- 288,294 ---- #define AOUT_RELOC(af, type, off) (type*) ((af)->address + (off)) static int ! load_dependencies(linker_file_t lf) { aout_file_t af = lf->priv; linker_file_t lfdep; *************** *** 303,315 **** */ if (linker_kernel_file) { linker_kernel_file->refs++; ! linker_file_add_dependancy(lf, linker_kernel_file); } off = LD_NEED(af->dynamic); /* ! * Load the dependancies. */ while (off != 0) { sodp = AOUT_RELOC(af, struct sod, off); --- 303,315 ---- */ if (linker_kernel_file) { linker_kernel_file->refs++; ! linker_file_add_dependency(lf, linker_kernel_file); } off = LD_NEED(af->dynamic); /* ! * Load the dependencies. */ while (off != 0) { sodp = AOUT_RELOC(af, struct sod, off); *************** *** 318,324 **** error = linker_load_file(name, &lfdep); if (error) goto out; ! error = linker_file_add_dependancy(lf, lfdep); if (error) goto out; off = sodp->sod_next; --- 318,324 ---- error = linker_load_file(name, &lfdep); if (error) goto out; ! error = linker_file_add_dependency(lf, lfdep); if (error) goto out; off = sodp->sod_next; *** kern/link_elf.c Sat Nov 7 10:52:47 1998 --- kern/link_elf.c.new Sat Nov 7 11:56:06 1998 *************** *** 108,114 **** } *elf_file_t; static int parse_dynamic(linker_file_t lf); ! static int load_dependancies(linker_file_t lf); static int relocate_file(linker_file_t lf); static int parse_module_symbols(linker_file_t lf); --- 108,114 ---- } *elf_file_t; static int parse_dynamic(linker_file_t lf); ! static int load_dependencies(linker_file_t lf); static int relocate_file(linker_file_t lf); static int parse_module_symbols(linker_file_t lf); *************** *** 373,379 **** linker_file_unload(lf); return error; } ! error = load_dependancies(lf); if (error) { linker_file_unload(lf); return error; --- 373,379 ---- linker_file_unload(lf); return error; } ! error = load_dependencies(lf); if (error) { linker_file_unload(lf); return error; *************** *** 615,621 **** error = parse_dynamic(lf); if (error) goto out; ! error = load_dependancies(lf); if (error) goto out; error = relocate_file(lf); --- 615,621 ---- error = parse_dynamic(lf); if (error) goto out; ! error = load_dependencies(lf); if (error) goto out; error = relocate_file(lf); *************** *** 727,733 **** } static int ! load_dependancies(linker_file_t lf) { elf_file_t ef = lf->priv; linker_file_t lfdep; --- 727,733 ---- } static int ! load_dependencies(linker_file_t lf) { elf_file_t ef = lf->priv; linker_file_t lfdep; *************** *** 740,746 **** */ if (linker_kernel_file) { linker_kernel_file->refs++; ! linker_file_add_dependancy(lf, linker_kernel_file); } for (dp = ef->dynamic; dp->d_tag != DT_NULL; dp++) { --- 740,746 ---- */ if (linker_kernel_file) { linker_kernel_file->refs++; ! linker_file_add_dependency(lf, linker_kernel_file); } for (dp = ef->dynamic; dp->d_tag != DT_NULL; dp++) { *************** *** 750,756 **** error = linker_load_file(name, &lfdep); if (error) goto out; ! error = linker_file_add_dependancy(lf, lfdep); if (error) goto out; } --- 750,756 ---- error = linker_load_file(name, &lfdep); if (error) goto out; ! error = linker_file_add_dependency(lf, lfdep); if (error) goto out; } *** sys/linker.h Sat Nov 7 10:52:53 1998 --- sys/linker.h.new Sat Nov 7 11:56:06 1998 *************** *** 72,78 **** linker_sym_t* sym, long* diffp); /* ! * Unload a file, releasing dependancies and freeing storage. */ void (*unload)(linker_file_t); }; --- 72,78 ---- linker_sym_t* sym, long* diffp); /* ! * Unload a file, releasing dependencies and freeing storage. */ void (*unload)(linker_file_t); }; *************** *** 91,98 **** int id; /* unique id */ caddr_t address; /* load address */ size_t size; /* size of file */ ! int ndeps; /* number of dependancies */ ! linker_file_t* deps; /* list of dependancies */ STAILQ_HEAD(, common_symbol) common; /* list of common symbols */ TAILQ_HEAD(, module) modules; /* modules in this file */ void* priv; /* implementation data */ --- 91,98 ---- int id; /* unique id */ caddr_t address; /* load address */ size_t size; /* size of file */ ! int ndeps; /* number of dependencies */ ! linker_file_t* deps; /* list of dependencies */ STAILQ_HEAD(, common_symbol) common; /* list of common symbols */ TAILQ_HEAD(, module) modules; /* modules in this file */ void* priv; /* implementation data */ *************** *** 170,181 **** int linker_file_unload(linker_file_t file); /* ! * Add a dependancy to a file. */ ! int linker_file_add_dependancy(linker_file_t file, linker_file_t dep); /* ! * Lookup a symbol in a file. If deps is TRUE, look in dependancies * if not found in file. */ caddr_t linker_file_lookup_symbol(linker_file_t file, const char* name, --- 170,181 ---- int linker_file_unload(linker_file_t file); /* ! * Add a dependency to a file. */ ! int linker_file_add_dependency(linker_file_t file, linker_file_t dep); /* ! * Lookup a symbol in a file. If deps is TRUE, look in dependencies * if not found in file. */ caddr_t linker_file_lookup_symbol(linker_file_t file, const char* name, >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message