From 1ce48e9e93c686aef24bb066ce76c2fcf08f96b6 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 8 May 2014 16:34:25 -0400 Subject: [PATCH] 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 --- src/sys/pioctl_nt.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.39.5