summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common/module.c')
-rw-r--r--sys/boot/common/module.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/boot/common/module.c b/sys/boot/common/module.c
index 2af9c20..a0c27dc 100644
--- a/sys/boot/common/module.c
+++ b/sys/boot/common/module.c
@@ -358,14 +358,14 @@ file_load_dependencies(struct preloaded_file *base_file)
}
/*
- * We've been asked to load (name) as (type), so just suck it in,
+ * We've been asked to load (fname) as (type), so just suck it in,
* no arguments or anything.
*/
struct preloaded_file *
-file_loadraw(char *name, char *type, int insert)
+file_loadraw(const char *fname, char *type, int insert)
{
struct preloaded_file *fp;
- char *cp;
+ char *name;
int fd, got;
vm_offset_t laddr;
@@ -376,12 +376,11 @@ file_loadraw(char *name, char *type, int insert)
}
/* locate the file on the load path */
- cp = file_search(name, NULL);
- if (cp == NULL) {
- sprintf(command_errbuf, "can't find '%s'", name);
+ name = file_search(fname, NULL);
+ if (name == NULL) {
+ sprintf(command_errbuf, "can't find '%s'", fname);
return(NULL);
}
- name = cp;
if ((fd = open(name, O_RDONLY)) < 0) {
sprintf(command_errbuf, "can't open '%s': %s", name, strerror(errno));
@@ -962,7 +961,7 @@ moduledir_rebuild(void)
{
struct moduledir *mdp, *mtmp;
const char *path, *cp, *ep;
- int cplen;
+ size_t cplen;
path = getenv("module_path");
if (path == NULL)
OpenPOWER on IntegriCloud