From: Jeffrey Altman Date: Thu, 8 May 2014 20:34:25 +0000 (-0400) Subject: sys: pioctl_nt translate WinErr to Unix X-Git-Tag: upstream/1.8.0_pre1^2~597 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1ce48e9e93c686aef24bb066ce76c2fcf08f96b6;p=packages%2Fo%2Fopenafs.git sys: pioctl_nt translate WinErr to Unix When reading the result of a pioctl fails with ERROR_NOT_SUPPORTED this must be translated to an EINVAL errno. Change-Id: I3db03f80b8a0da5d7e4931dc5673c7010d580d8d Reviewed-on: http://gerrit.openafs.org/11417 Tested-by: BuildBot Reviewed-by: Jeffrey Altman --- diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index 2d51ebb9d..319564e44 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -1137,6 +1137,10 @@ Transceive(HANDLE handle, fs_ioctlRequest_t * reqp) fprintf(stderr, "pioctl Transceive ReadFile failed: 0x%X\r\n",gle); errno = save; } + if (gle == ERROR_NOT_SUPPORTED) { + errno = EINVAL; + return -1; + } return gle; }