mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 15:30:14 +00:00
DARWIN: Fix setpag syscall error detection
Darwin uses the same variable as the return value for ioctl_afs_syscall, and as the last 'out' parmater, so the return value for ioctl_afs_syscall will always overwrite whatever is written to the last 'out' parameter. Instead, record two different variables, and allow the returned error to overridte the error set as the last parameter. Change-Id: I7db1b226612c55c892810ce446b486b7e503529c Reviewed-on: http://gerrit.openafs.org/3497 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
f46bba8611
commit
9da7f3cc73
@ -57,7 +57,12 @@ lsetpag(void)
|
||||
if(rval)
|
||||
errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
|
||||
#elif defined(AFS_DARWIN80_ENV)
|
||||
errcode = ioctl_afs_syscall(AFSCALL_SETPAG,0,0,0,0,0,0,&errcode);
|
||||
int rval;
|
||||
|
||||
rval = ioctl_afs_syscall(AFSCALL_SETPAG,0,0,0,0,0,0,&errcode);
|
||||
if (rval) {
|
||||
errorcode = rval;
|
||||
}
|
||||
#else
|
||||
errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user