2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
15 #include <afs/errmap_nt.h>
17 int nterr_lastNTError
= 0; /* Useful for core dumps from LWP based binaries */
20 * nterr_nt2unix() -- convert NT error code to a Unix-ish value.
22 * RETURN CODES: translated code, or 'defaultErr' if no translation available.
26 nterr_nt2unix(long ntErr
, int defaultErr
)
30 nterr_lastNTError
= ntErr
;
35 case ERROR_INVALID_PARAMETER
:
36 case ERROR_BAD_COMMAND
:
39 case ERROR_FILE_NOT_FOUND
:
40 case ERROR_PATH_NOT_FOUND
:
41 case ERROR_INVALID_DRIVE
:
44 case ERROR_FILE_EXISTS
:
45 case ERROR_ALREADY_EXISTS
:
48 case ERROR_ACCESS_DENIED
:
51 case ERROR_WRITE_PROTECT
:
54 case ERROR_NOT_SUPPORTED
:
57 case ERROR_INVALID_HANDLE
:
60 case ERROR_TOO_MANY_OPEN_FILES
:
64 case ERROR_HANDLE_DISK_FULL
:
67 case ERROR_OUTOFMEMORY
:
68 case ERROR_NOT_ENOUGH_MEMORY
:
71 case ERROR_SHARING_VIOLATION
:
75 case ERROR_BROKEN_PIPE
:
77 case ERROR_PIPE_NOT_CONNECTED
: