From: Derrick Brashear Date: Fri, 4 Nov 2011 15:43:01 +0000 (-0400) Subject: ukernel: handle pioctl errors properly in ktc X-Git-Tag: upstream/1.8.0_pre1^2~3077 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b06c700ee40ca70ef08259af819e2a6084137457;p=packages%2Fo%2Fopenafs.git ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Change-Id: I3fbba799e0156bad29b27c74a1c7709ee8c50c34 Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- diff --git a/src/auth/ktc.c b/src/auth/ktc.c index 138a8441d..511c42b7d 100644 --- a/src/auth/ktc.c +++ b/src/auth/ktc.c @@ -124,7 +124,7 @@ static void ktc_LocalCell(void); #ifdef AFS_DUX40_ENV #define PIOCTL afs_pioctl #elif defined(UKERNEL) -#define PIOCTL(A,B,C,D) call_syscall(AFSCALL_PIOCTL,A,B,C,D) +#define PIOCTL(A,B,C,D) (errno = (call_syscall(AFSCALL_PIOCTL,A,B,C,D)), errno?-1:0) #else #define PIOCTL pioctl #endif