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
c1cbf173b2
commit
c77d37e5b9
@ -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…
x
Reference in New Issue
Block a user