From: Derrick Brashear Date: Thu, 22 May 2003 15:22:47 +0000 (+0000) Subject: STABLE12-pioctl-return-negative-errors-on-linux-20030522 X-Git-Tag: openafs-stable-1_2_10~55 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=48a9b91e093d6c6e35768dd74a94b231c51bbbd5;p=packages%2Fo%2Fopenafs.git STABLE12-pioctl-return-negative-errors-on-linux-20030522 otherwise we can end up with errors that make no sense. (cherry picked from commit 7d710fd45f7f6fa06de22d4f524342d02ae4afcd) --- diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 6cf43588c..74f33c27f 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -1028,13 +1028,17 @@ afs_syscall_pioctl(path, com, cmarg, follow) #endif } PIOCTL_FREE_CRED(); -#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SGI64_ENV) || defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) +#ifdef AFS_LINUX22_ENV + return -code; +#else +#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_SGI64_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV) return (code); #else if (!getuerror()) setuerror(code); return (getuerror()); #endif +#endif }