mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 14:39:37 +00:00
Unbreak 64-bit architectures. The 3rd argument to kern_kldload() is
a pointer to an integer and td->td_retval[0] is of type register_t. On 64-bit architectures register_t is wider than an integer.
This commit is contained in:
parent
7eae78a419
commit
e1684acf38
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159596
@ -796,15 +796,17 @@ int
|
||||
kldload(struct thread *td, struct kldload_args *uap)
|
||||
{
|
||||
char *pathname = NULL;
|
||||
int error;
|
||||
int error, fileid;
|
||||
|
||||
td->td_retval[0] = -1;
|
||||
|
||||
pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
|
||||
error = copyinstr(uap->file, pathname, MAXPATHLEN, NULL);
|
||||
if (error == 0)
|
||||
error = kern_kldload(td, pathname, &td->td_retval[0]);
|
||||
|
||||
if (error == 0) {
|
||||
error = kern_kldload(td, pathname, &fileid);
|
||||
if (error == 0)
|
||||
td->td_retval[0] = fileid;
|
||||
}
|
||||
free(pathname, M_TEMP);
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user