mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
A temporary band-aid for ng_base. It works for some people, a better
fix will follow. Submitted by: Gary Jennejohn <garyj@muc.de>
This commit is contained in:
parent
365c5db0a7
commit
cc3daab531
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59875
@ -309,16 +309,13 @@ ng_make_node(const char *typename, node_p *nodepp)
|
||||
|
||||
/* Locate the node type */
|
||||
if ((type = ng_findtype(typename)) == NULL) {
|
||||
char *path, filename[NG_TYPELEN + 4];
|
||||
char filename[NG_TYPELEN + 4];
|
||||
linker_file_t lf;
|
||||
int error;
|
||||
|
||||
/* Not found, try to load it as a loadable module */
|
||||
snprintf(filename, sizeof(filename), "ng_%s.ko", typename);
|
||||
if ((path = linker_search_path(filename)) == NULL)
|
||||
return (ENXIO);
|
||||
error = linker_load_file(path, &lf);
|
||||
FREE(path, M_LINKER);
|
||||
snprintf(filename, sizeof(filename), "ng_%s", typename);
|
||||
error = linker_load_file(filename, &lf);
|
||||
if (error != 0)
|
||||
return (error);
|
||||
lf->userrefs++; /* pretend loaded by the syscall */
|
||||
|
Loading…
Reference in New Issue
Block a user