These error codes are returned on windows in case a particular functions
is not supported.
Updates #41198
Change-Id: Ic31755a131d4e7c96961ba54f5bb51026fc7a563
Reviewed-on: https://go-review.googlesource.com/c/go/+/476916
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
return string(utf16.Decode(b[:n]))
}
-const _ERROR_BAD_NETPATH = Errno(53)
+const (
+ _ERROR_NOT_SUPPORTED = Errno(50)
+ _ERROR_BAD_NETPATH = Errno(53)
+ _ERROR_CALL_NOT_IMPLEMENTED = Errno(120)
+)
func (e Errno) Is(target error) bool {
switch target {
e == ERROR_PATH_NOT_FOUND ||
e == ENOENT
case errorspkg.ErrUnsupported:
- return e == ENOSYS ||
+ return e == _ERROR_NOT_SUPPORTED ||
+ e == _ERROR_CALL_NOT_IMPLEMENTED ||
+ e == ENOSYS ||
e == ENOTSUP ||
e == EOPNOTSUPP ||
e == EWINDOWS