diff options
author | marcel <marcel@FreeBSD.org> | 2006-06-14 03:01:06 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2006-06-14 03:01:06 +0000 |
commit | c77d37e5b91fb5a9b2db51d524dbd6a1863c11c4 (patch) | |
tree | 27ee501db7b2e5041f9efdc2e495c531e5a649ce /sys/kern/kern_linker.c | |
parent | c1cbf173b2b8ce75b3e4d0751756022bdf03714a (diff) | |
download | FreeBSD-src-c77d37e5b91fb5a9b2db51d524dbd6a1863c11c4.zip FreeBSD-src-c77d37e5b91fb5a9b2db51d524dbd6a1863c11c4.tar.gz |
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.
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r-- | sys/kern/kern_linker.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index 23051c4..52eac0f 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -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); } |