162306a36Sopenharmony_ci/* SPDX-License-Identifier: LGPL-2.1 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Copyright (c) International Business Machines Corp., 2002,2004 562306a36Sopenharmony_ci * Author(s): Steve French (sfrench@us.ibm.com) 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * See Error Codes section of the SNIA CIFS Specification 862306a36Sopenharmony_ci * for more information 962306a36Sopenharmony_ci * 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define SUCCESS 0x00 /* The request was successful. */ 1362306a36Sopenharmony_ci#define ERRDOS 0x01 /* Error is from the core DOS operating system set */ 1462306a36Sopenharmony_ci#define ERRSRV 0x02 /* Error is generated by the file server daemon */ 1562306a36Sopenharmony_ci#define ERRHRD 0x03 /* Error is a hardware error. */ 1662306a36Sopenharmony_ci#define ERRCMD 0xFF /* Command was not in the "SMB" format. */ 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/* The following error codes may be generated with the SUCCESS error class.*/ 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci/*#define SUCCESS 0 The request was successful. */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* The following error codes may be generated with the ERRDOS error class.*/ 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci#define ERRbadfunc 1 /* Invalid function. The server did not 2562306a36Sopenharmony_ci recognize or could not perform a 2662306a36Sopenharmony_ci system call generated by the server, 2762306a36Sopenharmony_ci e.g., set the DIRECTORY attribute on 2862306a36Sopenharmony_ci a data file, invalid seek mode. */ 2962306a36Sopenharmony_ci#define ERRbadfile 2 /* File not found. The last component 3062306a36Sopenharmony_ci of a file's pathname could not be 3162306a36Sopenharmony_ci found. */ 3262306a36Sopenharmony_ci#define ERRbadpath 3 /* Directory invalid. A directory 3362306a36Sopenharmony_ci component in a pathname could not be 3462306a36Sopenharmony_ci found. */ 3562306a36Sopenharmony_ci#define ERRnofids 4 /* Too many open files. The server has 3662306a36Sopenharmony_ci no file handles available. */ 3762306a36Sopenharmony_ci#define ERRnoaccess 5 /* Access denied, the client's context 3862306a36Sopenharmony_ci does not permit the requested 3962306a36Sopenharmony_ci function. This includes the 4062306a36Sopenharmony_ci following conditions: invalid rename 4162306a36Sopenharmony_ci command, write to Fid open for read 4262306a36Sopenharmony_ci only, read on Fid open for write 4362306a36Sopenharmony_ci only, attempt to delete a non-empty 4462306a36Sopenharmony_ci directory */ 4562306a36Sopenharmony_ci#define ERRbadfid 6 /* Invalid file handle. The file handle 4662306a36Sopenharmony_ci specified was not recognized by the 4762306a36Sopenharmony_ci server. */ 4862306a36Sopenharmony_ci#define ERRbadmcb 7 /* Memory control blocks destroyed. */ 4962306a36Sopenharmony_ci#define ERRnomem 8 /* Insufficient server memory to 5062306a36Sopenharmony_ci perform the requested function. */ 5162306a36Sopenharmony_ci#define ERRbadmem 9 /* Invalid memory block address. */ 5262306a36Sopenharmony_ci#define ERRbadenv 10 /* Invalid environment. */ 5362306a36Sopenharmony_ci#define ERRbadformat 11 /* Invalid format. */ 5462306a36Sopenharmony_ci#define ERRbadaccess 12 /* Invalid open mode. */ 5562306a36Sopenharmony_ci#define ERRbaddata 13 /* Invalid data (generated only by 5662306a36Sopenharmony_ci IOCTL calls within the server). */ 5762306a36Sopenharmony_ci#define ERRbaddrive 15 /* Invalid drive specified. */ 5862306a36Sopenharmony_ci#define ERRremcd 16 /* A Delete Directory request attempted 5962306a36Sopenharmony_ci to remove the server's current 6062306a36Sopenharmony_ci directory. */ 6162306a36Sopenharmony_ci#define ERRdiffdevice 17 /* Not same device (e.g., a cross 6262306a36Sopenharmony_ci volume rename was attempted */ 6362306a36Sopenharmony_ci#define ERRnofiles 18 /* A File Search command can find no 6462306a36Sopenharmony_ci more files matching the specified 6562306a36Sopenharmony_ci criteria. */ 6662306a36Sopenharmony_ci#define ERRwriteprot 19 /* media is write protected */ 6762306a36Sopenharmony_ci#define ERRgeneral 31 6862306a36Sopenharmony_ci#define ERRbadshare 32 /* The sharing mode specified for an 6962306a36Sopenharmony_ci Open conflicts with existing FIDs on 7062306a36Sopenharmony_ci the file. */ 7162306a36Sopenharmony_ci#define ERRlock 33 /* A Lock request conflicted with an 7262306a36Sopenharmony_ci existing lock or specified an 7362306a36Sopenharmony_ci invalid mode, or an Unlock requested 7462306a36Sopenharmony_ci attempted to remove a lock held by 7562306a36Sopenharmony_ci another process. */ 7662306a36Sopenharmony_ci#define ERRunsup 50 7762306a36Sopenharmony_ci#define ERRnosuchshare 67 7862306a36Sopenharmony_ci#define ERRfilexists 80 /* The file named in the request 7962306a36Sopenharmony_ci already exists. */ 8062306a36Sopenharmony_ci#define ERRinvparm 87 8162306a36Sopenharmony_ci#define ERRdiskfull 112 8262306a36Sopenharmony_ci#define ERRinvname 123 8362306a36Sopenharmony_ci#define ERRinvlevel 124 8462306a36Sopenharmony_ci#define ERRdirnotempty 145 8562306a36Sopenharmony_ci#define ERRnotlocked 158 8662306a36Sopenharmony_ci#define ERRcancelviolation 173 8762306a36Sopenharmony_ci#define ERRalreadyexists 183 8862306a36Sopenharmony_ci#define ERRbadpipe 230 8962306a36Sopenharmony_ci#define ERRpipebusy 231 9062306a36Sopenharmony_ci#define ERRpipeclosing 232 9162306a36Sopenharmony_ci#define ERRnotconnected 233 9262306a36Sopenharmony_ci#define ERRmoredata 234 9362306a36Sopenharmony_ci#define ERReasnotsupported 282 9462306a36Sopenharmony_ci#define ErrQuota 0x200 /* The operation would cause a quota 9562306a36Sopenharmony_ci limit to be exceeded. */ 9662306a36Sopenharmony_ci#define ErrNotALink 0x201 /* A link operation was performed on a 9762306a36Sopenharmony_ci pathname that was not a link. */ 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci/* Below errors are used internally (do not come over the wire) for passthrough 10062306a36Sopenharmony_ci from STATUS codes to POSIX only */ 10162306a36Sopenharmony_ci#define ERRsymlink 0xFFFD 10262306a36Sopenharmony_ci#define ErrTooManyLinks 0xFFFE 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci/* Following error codes may be generated with the ERRSRV error class.*/ 10562306a36Sopenharmony_ci 10662306a36Sopenharmony_ci#define ERRerror 1 /* Non-specific error code. It is 10762306a36Sopenharmony_ci returned under the following 10862306a36Sopenharmony_ci conditions: resource other than disk 10962306a36Sopenharmony_ci space exhausted (e.g. TIDs), first 11062306a36Sopenharmony_ci SMB command was not negotiate, 11162306a36Sopenharmony_ci multiple negotiates attempted, and 11262306a36Sopenharmony_ci internal server error. */ 11362306a36Sopenharmony_ci#define ERRbadpw 2 /* Bad password - name/password pair in 11462306a36Sopenharmony_ci a TreeConnect or Session Setup are 11562306a36Sopenharmony_ci invalid. */ 11662306a36Sopenharmony_ci#define ERRbadtype 3 /* used for indicating DFS referral 11762306a36Sopenharmony_ci needed */ 11862306a36Sopenharmony_ci#define ERRaccess 4 /* The client does not have the 11962306a36Sopenharmony_ci necessary access rights within the 12062306a36Sopenharmony_ci specified context for requested 12162306a36Sopenharmony_ci function. */ 12262306a36Sopenharmony_ci#define ERRinvtid 5 /* The Tid specified in a command was 12362306a36Sopenharmony_ci invalid. */ 12462306a36Sopenharmony_ci#define ERRinvnetname 6 /* Invalid network name in tree 12562306a36Sopenharmony_ci connect. */ 12662306a36Sopenharmony_ci#define ERRinvdevice 7 /* Invalid device - printer request 12762306a36Sopenharmony_ci made to non-printer connection or 12862306a36Sopenharmony_ci non-printer request made to printer 12962306a36Sopenharmony_ci connection. */ 13062306a36Sopenharmony_ci#define ERRqfull 49 /* Print queue full (files) -- returned 13162306a36Sopenharmony_ci by open print file. */ 13262306a36Sopenharmony_ci#define ERRqtoobig 50 /* Print queue full -- no space. */ 13362306a36Sopenharmony_ci#define ERRqeof 51 /* EOF on print queue dump */ 13462306a36Sopenharmony_ci#define ERRinvpfid 52 /* Invalid print file FID. */ 13562306a36Sopenharmony_ci#define ERRsmbcmd 64 /* The server did not recognize the 13662306a36Sopenharmony_ci command received. */ 13762306a36Sopenharmony_ci#define ERRsrverror 65 /* The server encountered an internal 13862306a36Sopenharmony_ci error, e.g., system file 13962306a36Sopenharmony_ci unavailable. */ 14062306a36Sopenharmony_ci#define ERRbadBID 66 /* (obsolete) */ 14162306a36Sopenharmony_ci#define ERRfilespecs 67 /* The Fid and pathname parameters 14262306a36Sopenharmony_ci contained an invalid combination of 14362306a36Sopenharmony_ci values. */ 14462306a36Sopenharmony_ci#define ERRbadLink 68 /* (obsolete) */ 14562306a36Sopenharmony_ci#define ERRbadpermits 69 /* The access permissions specified for 14662306a36Sopenharmony_ci a file or directory are not a valid 14762306a36Sopenharmony_ci combination. */ 14862306a36Sopenharmony_ci#define ERRbadPID 70 14962306a36Sopenharmony_ci#define ERRsetattrmode 71 /* attribute (mode) is invalid */ 15062306a36Sopenharmony_ci#define ERRpaused 81 /* Server is paused */ 15162306a36Sopenharmony_ci#define ERRmsgoff 82 /* reserved - messaging off */ 15262306a36Sopenharmony_ci#define ERRnoroom 83 /* reserved - no room for message */ 15362306a36Sopenharmony_ci#define ERRrmuns 87 /* reserved - too many remote names */ 15462306a36Sopenharmony_ci#define ERRtimeout 88 /* operation timed out */ 15562306a36Sopenharmony_ci#define ERRnoresource 89 /* No resources available for request 15662306a36Sopenharmony_ci */ 15762306a36Sopenharmony_ci#define ERRtoomanyuids 90 /* Too many UIDs active on this session 15862306a36Sopenharmony_ci */ 15962306a36Sopenharmony_ci#define ERRbaduid 91 /* The UID is not known as a valid user 16062306a36Sopenharmony_ci */ 16162306a36Sopenharmony_ci#define ERRusempx 250 /* temporarily unable to use raw */ 16262306a36Sopenharmony_ci#define ERRusestd 251 /* temporarily unable to use either raw 16362306a36Sopenharmony_ci or mpx */ 16462306a36Sopenharmony_ci#define ERR_NOTIFY_ENUM_DIR 1024 16562306a36Sopenharmony_ci#define ERRnoSuchUser 2238 /* user account does not exist */ 16662306a36Sopenharmony_ci#define ERRaccountexpired 2239 16762306a36Sopenharmony_ci#define ERRbadclient 2240 /* can not logon from this client */ 16862306a36Sopenharmony_ci#define ERRbadLogonTime 2241 /* logon hours do not allow this */ 16962306a36Sopenharmony_ci#define ERRpasswordExpired 2242 17062306a36Sopenharmony_ci#define ERRnetlogonNotStarted 2455 17162306a36Sopenharmony_ci#define ERRnosupport 0xFFFF 172