Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * fs/cifs/smberr.h |
| 3 | * |
| 4 | * Copyright (c) International Business Machines Corp., 2002,2004 |
| 5 | * Author(s): Steve French (sfrench@us.ibm.com) |
| 6 | * |
Steve French | 79a58d1 | 2007-07-06 22:44:50 +0000 | [diff] [blame] | 7 | * See Error Codes section of the SNIA CIFS Specification |
| 8 | * for more information |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * |
| 10 | * This library is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU Lesser General Public License as published |
| 12 | * by the Free Software Foundation; either version 2.1 of the License, or |
| 13 | * (at your option) any later version. |
| 14 | * |
| 15 | * This library is distributed in the hope that it will be useful, |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
| 18 | * the GNU Lesser General Public License for more details. |
| 19 | * |
| 20 | * You should have received a copy of the GNU Lesser General Public License |
| 21 | * along with this library; if not, write to the Free Software |
Steve French | 79a58d1 | 2007-07-06 22:44:50 +0000 | [diff] [blame] | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | */ |
| 24 | |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 25 | #define SUCCESS 0x00 /* The request was successful. */ |
| 26 | #define ERRDOS 0x01 /* Error is from the core DOS operating system set */ |
| 27 | #define ERRSRV 0x02 /* Error is generated by the file server daemon */ |
| 28 | #define ERRHRD 0x03 /* Error is a hardware error. */ |
| 29 | #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
| 31 | /* The following error codes may be generated with the SUCCESS error class.*/ |
| 32 | |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 33 | /*#define SUCCESS 0 The request was successful. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | |
| 35 | /* The following error codes may be generated with the ERRDOS error class.*/ |
| 36 | |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 37 | #define ERRbadfunc 1 /* Invalid function. The server did not |
| 38 | recognize or could not perform a |
| 39 | system call generated by the server, |
| 40 | e.g., set the DIRECTORY attribute on |
| 41 | a data file, invalid seek mode. */ |
| 42 | #define ERRbadfile 2 /* File not found. The last component |
| 43 | of a file's pathname could not be |
| 44 | found. */ |
| 45 | #define ERRbadpath 3 /* Directory invalid. A directory |
| 46 | component in a pathname could not be |
| 47 | found. */ |
| 48 | #define ERRnofids 4 /* Too many open files. The server has |
| 49 | no file handles available. */ |
| 50 | #define ERRnoaccess 5 /* Access denied, the client's context |
| 51 | does not permit the requested |
| 52 | function. This includes the |
| 53 | following conditions: invalid rename |
| 54 | command, write to Fid open for read |
| 55 | only, read on Fid open for write |
| 56 | only, attempt to delete a non-empty |
| 57 | directory */ |
| 58 | #define ERRbadfid 6 /* Invalid file handle. The file handle |
| 59 | specified was not recognized by the |
| 60 | server. */ |
| 61 | #define ERRbadmcb 7 /* Memory control blocks destroyed. */ |
| 62 | #define ERRnomem 8 /* Insufficient server memory to |
| 63 | perform the requested function. */ |
| 64 | #define ERRbadmem 9 /* Invalid memory block address. */ |
| 65 | #define ERRbadenv 10 /* Invalid environment. */ |
| 66 | #define ERRbadformat 11 /* Invalid format. */ |
| 67 | #define ERRbadaccess 12 /* Invalid open mode. */ |
| 68 | #define ERRbaddata 13 /* Invalid data (generated only by |
| 69 | IOCTL calls within the server). */ |
| 70 | #define ERRbaddrive 15 /* Invalid drive specified. */ |
| 71 | #define ERRremcd 16 /* A Delete Directory request attempted |
| 72 | to remove the server's current |
| 73 | directory. */ |
| 74 | #define ERRdiffdevice 17 /* Not same device (e.g., a cross |
| 75 | volume rename was attempted */ |
| 76 | #define ERRnofiles 18 /* A File Search command can find no |
| 77 | more files matching the specified |
| 78 | criteria. */ |
| 79 | #define ERRgeneral 31 |
| 80 | #define ERRbadshare 32 /* The sharing mode specified for an |
| 81 | Open conflicts with existing FIDs on |
| 82 | the file. */ |
| 83 | #define ERRlock 33 /* A Lock request conflicted with an |
| 84 | existing lock or specified an |
| 85 | invalid mode, or an Unlock requested |
| 86 | attempted to remove a lock held by |
| 87 | another process. */ |
| 88 | #define ERRunsup 50 |
| 89 | #define ERRnosuchshare 67 |
| 90 | #define ERRfilexists 80 /* The file named in the request |
| 91 | already exists. */ |
| 92 | #define ERRinvparm 87 |
| 93 | #define ERRdiskfull 112 |
| 94 | #define ERRinvname 123 |
| 95 | #define ERRinvlevel 124 |
| 96 | #define ERRdirnotempty 145 |
| 97 | #define ERRnotlocked 158 |
Jeremy Allison | 7ee1af7 | 2006-08-02 21:56:33 +0000 | [diff] [blame] | 98 | #define ERRcancelviolation 173 |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 99 | #define ERRalreadyexists 183 |
| 100 | #define ERRbadpipe 230 |
| 101 | #define ERRpipebusy 231 |
| 102 | #define ERRpipeclosing 232 |
| 103 | #define ERRnotconnected 233 |
| 104 | #define ERRmoredata 234 |
| 105 | #define ERReasnotsupported 282 |
| 106 | #define ErrQuota 0x200 /* The operation would cause a quota |
| 107 | limit to be exceeded. */ |
| 108 | #define ErrNotALink 0x201 /* A link operation was performed on a |
| 109 | pathname that was not a link. */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | |
Steve French | 11aa014 | 2005-04-28 22:41:10 -0700 | [diff] [blame] | 111 | /* Below errors are used internally (do not come over the wire) for passthrough |
| 112 | from STATUS codes to POSIX only */ |
Steve French | 9e39b0a | 2009-04-30 21:31:15 +0000 | [diff] [blame] | 113 | #define ERRsymlink 0xFFFD |
Steve French | 6dc0f87 | 2007-07-06 23:13:06 +0000 | [diff] [blame] | 114 | #define ErrTooManyLinks 0xFFFE |
Steve French | 11aa014 | 2005-04-28 22:41:10 -0700 | [diff] [blame] | 115 | |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 116 | /* Following error codes may be generated with the ERRSRV error class.*/ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 117 | |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 118 | #define ERRerror 1 /* Non-specific error code. It is |
| 119 | returned under the following |
| 120 | conditions: resource other than disk |
| 121 | space exhausted (e.g. TIDs), first |
| 122 | SMB command was not negotiate, |
| 123 | multiple negotiates attempted, and |
| 124 | internal server error. */ |
| 125 | #define ERRbadpw 2 /* Bad password - name/password pair in |
| 126 | a TreeConnect or Session Setup are |
| 127 | invalid. */ |
| 128 | #define ERRbadtype 3 /* used for indicating DFS referral |
| 129 | needed */ |
| 130 | #define ERRaccess 4 /* The client does not have the |
| 131 | necessary access rights within the |
| 132 | specified context for requested |
| 133 | function. */ |
| 134 | #define ERRinvtid 5 /* The Tid specified in a command was |
| 135 | invalid. */ |
| 136 | #define ERRinvnetname 6 /* Invalid network name in tree |
| 137 | connect. */ |
| 138 | #define ERRinvdevice 7 /* Invalid device - printer request |
| 139 | made to non-printer connection or |
| 140 | non-printer request made to printer |
| 141 | connection. */ |
| 142 | #define ERRqfull 49 /* Print queue full (files) -- returned |
| 143 | by open print file. */ |
| 144 | #define ERRqtoobig 50 /* Print queue full -- no space. */ |
| 145 | #define ERRqeof 51 /* EOF on print queue dump */ |
| 146 | #define ERRinvpfid 52 /* Invalid print file FID. */ |
| 147 | #define ERRsmbcmd 64 /* The server did not recognize the |
| 148 | command received. */ |
| 149 | #define ERRsrverror 65 /* The server encountered an internal |
| 150 | error, e.g., system file |
| 151 | unavailable. */ |
| 152 | #define ERRbadBID 66 /* (obsolete) */ |
| 153 | #define ERRfilespecs 67 /* The Fid and pathname parameters |
| 154 | contained an invalid combination of |
| 155 | values. */ |
| 156 | #define ERRbadLink 68 /* (obsolete) */ |
| 157 | #define ERRbadpermits 69 /* The access permissions specified for |
| 158 | a file or directory are not a valid |
| 159 | combination. */ |
| 160 | #define ERRbadPID 70 |
| 161 | #define ERRsetattrmode 71 /* attribute (mode) is invalid */ |
| 162 | #define ERRpaused 81 /* Server is paused */ |
| 163 | #define ERRmsgoff 82 /* reserved - messaging off */ |
| 164 | #define ERRnoroom 83 /* reserved - no room for message */ |
| 165 | #define ERRrmuns 87 /* reserved - too many remote names */ |
| 166 | #define ERRtimeout 88 /* operation timed out */ |
| 167 | #define ERRnoresource 89 /* No resources available for request |
| 168 | */ |
| 169 | #define ERRtoomanyuids 90 /* Too many UIDs active on this session |
| 170 | */ |
| 171 | #define ERRbaduid 91 /* The UID is not known as a valid user |
| 172 | */ |
| 173 | #define ERRusempx 250 /* temporarily unable to use raw */ |
| 174 | #define ERRusestd 251 /* temporarily unable to use either raw |
| 175 | or mpx */ |
| 176 | #define ERR_NOTIFY_ENUM_DIR 1024 |
Steve French | a761ac5 | 2007-10-18 21:45:27 +0000 | [diff] [blame] | 177 | #define ERRnoSuchUser 2238 /* user account does not exist */ |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 178 | #define ERRaccountexpired 2239 |
Steve French | a761ac5 | 2007-10-18 21:45:27 +0000 | [diff] [blame] | 179 | #define ERRbadclient 2240 /* can not logon from this client */ |
| 180 | #define ERRbadLogonTime 2241 /* logon hours do not allow this */ |
Steve French | d14537f1 | 2005-04-28 22:41:05 -0700 | [diff] [blame] | 181 | #define ERRpasswordExpired 2242 |
| 182 | #define ERRnetlogonNotStarted 2455 |
| 183 | #define ERRnosupport 0xFFFF |