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>
17 #include <afs/errmap_nt.h>
19 int nterr_lastNTError = 0; /* Useful for core dumps from LWP based binaries */
22 * nterr_nt2unix() -- convert NT error code to a Unix-ish value.
24 * RETURN CODES: translated code, or 'defaultErr' if no translation available.
28 nterr_nt2unix(long ntErr, int defaultErr)
32 nterr_lastNTError = ntErr;
37 case ERROR_INVALID_PARAMETER:
38 case ERROR_BAD_COMMAND:
41 case ERROR_FILE_NOT_FOUND:
42 case ERROR_PATH_NOT_FOUND:
43 case ERROR_INVALID_DRIVE:
46 case ERROR_FILE_EXISTS:
47 case ERROR_ALREADY_EXISTS:
50 case ERROR_ACCESS_DENIED:
53 case ERROR_WRITE_PROTECT:
56 case ERROR_NOT_SUPPORTED:
59 case ERROR_INVALID_HANDLE:
62 case ERROR_TOO_MANY_OPEN_FILES:
66 case ERROR_HANDLE_DISK_FULL:
69 case ERROR_OUTOFMEMORY:
70 case ERROR_NOT_ENOUGH_MEMORY:
73 case ERROR_SHARING_VIOLATION:
77 case ERROR_BROKEN_PIPE:
79 case ERROR_PIPE_NOT_CONNECTED: