Use the preload_fetch_addr() and preload_fetch_size() convenience

functions to obtain the address and size of the preloaded pool
configuration file/repository.

Sponsored by: Juniper Networks.
This commit is contained in:
Marcel Moolenaar 2011-02-13 19:46:55 +00:00
parent 1e189c0839
commit 6e23016fd7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218665

View File

@ -200,10 +200,9 @@ kobj_read_file_loader(struct _buf *file, char *buf, unsigned size, unsigned off)
{
char *ptr;
ptr = preload_search_info(file->ptr, MODINFO_ADDR);
ptr = preload_fetch_addr(file->ptr);
if (ptr == NULL)
return (ENOENT);
ptr = *(void **)ptr;
bcopy(ptr + off, buf, size);
return (0);
}