Fix fcntl(..., F_GETOWN, ...) and fcntl(..., F_SETOWN, ...) on sparc64

by not passing a pointer to a register_t or intptr_t when the code in
the lower layers expects one to an int.
This commit is contained in:
Thomas Moestl 2002-09-13 15:15:16 +00:00
parent 6309b291ec
commit 4e115a85ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103293

View File

@ -326,15 +326,17 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg)
case F_GETOWN:
fhold(fp);
FILEDESC_UNLOCK(fdp);
error = fo_ioctl(fp, FIOGETOWN, (void *)td->td_retval,
td->td_ucred, td);
error = fo_ioctl(fp, FIOGETOWN, &tmp, td->td_ucred, td);
if (error == 0)
td->td_retval[0] = tmp;
fdrop(fp, td);
break;
case F_SETOWN:
fhold(fp);
FILEDESC_UNLOCK(fdp);
error = fo_ioctl(fp, FIOSETOWN, &arg, td->td_ucred, td);
tmp = arg;
error = fo_ioctl(fp, FIOSETOWN, &tmp, td->td_ucred, td);
fdrop(fp, td);
break;