18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci *   fs/cifs/smberr.h
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci *   Copyright (c) International Business Machines  Corp., 2002,2004
58c2ecf20Sopenharmony_ci *   Author(s): Steve French (sfrench@us.ibm.com)
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci *   See Error Codes section of the SNIA CIFS Specification
88c2ecf20Sopenharmony_ci *   for more information
98c2ecf20Sopenharmony_ci *
108c2ecf20Sopenharmony_ci *   This library is free software; you can redistribute it and/or modify
118c2ecf20Sopenharmony_ci *   it under the terms of the GNU Lesser General Public License as published
128c2ecf20Sopenharmony_ci *   by the Free Software Foundation; either version 2.1 of the License, or
138c2ecf20Sopenharmony_ci *   (at your option) any later version.
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci *   This library is distributed in the hope that it will be useful,
168c2ecf20Sopenharmony_ci *   but WITHOUT ANY WARRANTY; without even the implied warranty of
178c2ecf20Sopenharmony_ci *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
188c2ecf20Sopenharmony_ci *   the GNU Lesser General Public License for more details.
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci *   You should have received a copy of the GNU Lesser General Public License
218c2ecf20Sopenharmony_ci *   along with this library; if not, write to the Free Software
228c2ecf20Sopenharmony_ci *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
238c2ecf20Sopenharmony_ci */
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#define SUCCESS	0x00	/* The request was successful. */
268c2ecf20Sopenharmony_ci#define ERRDOS	0x01	/* Error is from the core DOS operating system set */
278c2ecf20Sopenharmony_ci#define ERRSRV	0x02	/* Error is generated by the file server daemon */
288c2ecf20Sopenharmony_ci#define ERRHRD	0x03	/* Error is a hardware error. */
298c2ecf20Sopenharmony_ci#define ERRCMD	0xFF	/* Command was not in the "SMB" format. */
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci/* The following error codes may be generated with the SUCCESS error class.*/
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ci/*#define SUCCESS	0	The request was successful. */
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci/* The following error codes may be generated with the ERRDOS error class.*/
368c2ecf20Sopenharmony_ci
378c2ecf20Sopenharmony_ci#define ERRbadfunc		1	/* Invalid function. The server did not
388c2ecf20Sopenharmony_ci					   recognize or could not perform a
398c2ecf20Sopenharmony_ci					   system call generated by the server,
408c2ecf20Sopenharmony_ci					   e.g., set the DIRECTORY attribute on
418c2ecf20Sopenharmony_ci					   a data file, invalid seek mode. */
428c2ecf20Sopenharmony_ci#define ERRbadfile		2	/* File not found. The last component
438c2ecf20Sopenharmony_ci					   of a file's pathname could not be
448c2ecf20Sopenharmony_ci					   found. */
458c2ecf20Sopenharmony_ci#define ERRbadpath		3	/* Directory invalid. A directory
468c2ecf20Sopenharmony_ci					   component in a pathname could not be
478c2ecf20Sopenharmony_ci					   found. */
488c2ecf20Sopenharmony_ci#define ERRnofids		4	/* Too many open files. The server has
498c2ecf20Sopenharmony_ci					   no file handles available. */
508c2ecf20Sopenharmony_ci#define ERRnoaccess		5	/* Access denied, the client's context
518c2ecf20Sopenharmony_ci					   does not permit the requested
528c2ecf20Sopenharmony_ci					   function. This includes the
538c2ecf20Sopenharmony_ci					   following conditions: invalid rename
548c2ecf20Sopenharmony_ci					   command, write to Fid open for read
558c2ecf20Sopenharmony_ci					   only, read on Fid open for write
568c2ecf20Sopenharmony_ci					   only, attempt to delete a non-empty
578c2ecf20Sopenharmony_ci					   directory */
588c2ecf20Sopenharmony_ci#define ERRbadfid		6	/* Invalid file handle. The file handle
598c2ecf20Sopenharmony_ci					   specified was not recognized by the
608c2ecf20Sopenharmony_ci					   server. */
618c2ecf20Sopenharmony_ci#define ERRbadmcb		7	/* Memory control blocks destroyed. */
628c2ecf20Sopenharmony_ci#define ERRnomem		8	/* Insufficient server memory to
638c2ecf20Sopenharmony_ci					   perform the requested function. */
648c2ecf20Sopenharmony_ci#define ERRbadmem		9	/* Invalid memory block address. */
658c2ecf20Sopenharmony_ci#define ERRbadenv		10	/* Invalid environment. */
668c2ecf20Sopenharmony_ci#define ERRbadformat		11	/* Invalid format. */
678c2ecf20Sopenharmony_ci#define ERRbadaccess		12	/* Invalid open mode. */
688c2ecf20Sopenharmony_ci#define ERRbaddata		13	/* Invalid data (generated only by
698c2ecf20Sopenharmony_ci					   IOCTL calls within the server). */
708c2ecf20Sopenharmony_ci#define ERRbaddrive		15	/* Invalid drive specified. */
718c2ecf20Sopenharmony_ci#define ERRremcd		16	/* A Delete Directory request attempted
728c2ecf20Sopenharmony_ci					   to remove the server's current
738c2ecf20Sopenharmony_ci					   directory. */
748c2ecf20Sopenharmony_ci#define ERRdiffdevice		17	/* Not same device (e.g., a cross
758c2ecf20Sopenharmony_ci					   volume rename was attempted */
768c2ecf20Sopenharmony_ci#define ERRnofiles		18	/* A File Search command can find no
778c2ecf20Sopenharmony_ci					   more files matching the specified
788c2ecf20Sopenharmony_ci					   criteria. */
798c2ecf20Sopenharmony_ci#define ERRwriteprot		19	/* media is write protected */
808c2ecf20Sopenharmony_ci#define ERRgeneral		31
818c2ecf20Sopenharmony_ci#define ERRbadshare		32	/* The sharing mode specified for an
828c2ecf20Sopenharmony_ci					   Open conflicts with existing FIDs on
838c2ecf20Sopenharmony_ci					   the file. */
848c2ecf20Sopenharmony_ci#define ERRlock			33	/* A Lock request conflicted with an
858c2ecf20Sopenharmony_ci					   existing lock or specified an
868c2ecf20Sopenharmony_ci					   invalid mode, or an Unlock requested
878c2ecf20Sopenharmony_ci					   attempted to remove a lock held by
888c2ecf20Sopenharmony_ci					   another process. */
898c2ecf20Sopenharmony_ci#define ERRunsup		50
908c2ecf20Sopenharmony_ci#define ERRnosuchshare		67
918c2ecf20Sopenharmony_ci#define ERRfilexists		80	/* The file named in the request
928c2ecf20Sopenharmony_ci					   already exists. */
938c2ecf20Sopenharmony_ci#define ERRinvparm		87
948c2ecf20Sopenharmony_ci#define ERRdiskfull		112
958c2ecf20Sopenharmony_ci#define ERRinvname		123
968c2ecf20Sopenharmony_ci#define ERRinvlevel		124
978c2ecf20Sopenharmony_ci#define ERRdirnotempty		145
988c2ecf20Sopenharmony_ci#define ERRnotlocked		158
998c2ecf20Sopenharmony_ci#define ERRcancelviolation	173
1008c2ecf20Sopenharmony_ci#define ERRalreadyexists	183
1018c2ecf20Sopenharmony_ci#define ERRbadpipe		230
1028c2ecf20Sopenharmony_ci#define ERRpipebusy		231
1038c2ecf20Sopenharmony_ci#define ERRpipeclosing		232
1048c2ecf20Sopenharmony_ci#define ERRnotconnected		233
1058c2ecf20Sopenharmony_ci#define ERRmoredata		234
1068c2ecf20Sopenharmony_ci#define ERReasnotsupported	282
1078c2ecf20Sopenharmony_ci#define ErrQuota		0x200	/* The operation would cause a quota
1088c2ecf20Sopenharmony_ci					   limit to be exceeded. */
1098c2ecf20Sopenharmony_ci#define ErrNotALink		0x201	/* A link operation was performed on a
1108c2ecf20Sopenharmony_ci					   pathname that was not a link. */
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci/* Below errors are used internally (do not come over the wire) for passthrough
1138c2ecf20Sopenharmony_ci   from STATUS codes to POSIX only  */
1148c2ecf20Sopenharmony_ci#define ERRsymlink              0xFFFD
1158c2ecf20Sopenharmony_ci#define ErrTooManyLinks         0xFFFE
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci/* Following error codes may be generated with the ERRSRV error class.*/
1188c2ecf20Sopenharmony_ci
1198c2ecf20Sopenharmony_ci#define ERRerror		1	/* Non-specific error code. It is
1208c2ecf20Sopenharmony_ci					   returned under the following
1218c2ecf20Sopenharmony_ci					   conditions: resource other than disk
1228c2ecf20Sopenharmony_ci					   space exhausted (e.g. TIDs), first
1238c2ecf20Sopenharmony_ci					   SMB command was not negotiate,
1248c2ecf20Sopenharmony_ci					   multiple negotiates attempted, and
1258c2ecf20Sopenharmony_ci					   internal server error. */
1268c2ecf20Sopenharmony_ci#define ERRbadpw		2	/* Bad password - name/password pair in
1278c2ecf20Sopenharmony_ci					   a TreeConnect or Session Setup are
1288c2ecf20Sopenharmony_ci					   invalid. */
1298c2ecf20Sopenharmony_ci#define ERRbadtype		3	/* used for indicating DFS referral
1308c2ecf20Sopenharmony_ci					   needed */
1318c2ecf20Sopenharmony_ci#define ERRaccess		4	/* The client does not have the
1328c2ecf20Sopenharmony_ci					   necessary access rights within the
1338c2ecf20Sopenharmony_ci					   specified context for requested
1348c2ecf20Sopenharmony_ci					   function. */
1358c2ecf20Sopenharmony_ci#define ERRinvtid		5	/* The Tid specified in a command was
1368c2ecf20Sopenharmony_ci					   invalid. */
1378c2ecf20Sopenharmony_ci#define ERRinvnetname		6	/* Invalid network name in tree
1388c2ecf20Sopenharmony_ci					   connect. */
1398c2ecf20Sopenharmony_ci#define ERRinvdevice		7	/* Invalid device - printer request
1408c2ecf20Sopenharmony_ci					   made to non-printer connection or
1418c2ecf20Sopenharmony_ci					   non-printer request made to printer
1428c2ecf20Sopenharmony_ci					   connection. */
1438c2ecf20Sopenharmony_ci#define ERRqfull		49	/* Print queue full (files) -- returned
1448c2ecf20Sopenharmony_ci					   by open print file. */
1458c2ecf20Sopenharmony_ci#define ERRqtoobig		50	/* Print queue full -- no space. */
1468c2ecf20Sopenharmony_ci#define ERRqeof			51	/* EOF on print queue dump */
1478c2ecf20Sopenharmony_ci#define ERRinvpfid		52	/* Invalid print file FID. */
1488c2ecf20Sopenharmony_ci#define ERRsmbcmd		64	/* The server did not recognize the
1498c2ecf20Sopenharmony_ci					   command received. */
1508c2ecf20Sopenharmony_ci#define ERRsrverror		65	/* The server encountered an internal
1518c2ecf20Sopenharmony_ci					   error, e.g., system file
1528c2ecf20Sopenharmony_ci					   unavailable. */
1538c2ecf20Sopenharmony_ci#define ERRbadBID		66	/* (obsolete) */
1548c2ecf20Sopenharmony_ci#define ERRfilespecs		67	/* The Fid and pathname parameters
1558c2ecf20Sopenharmony_ci					   contained an invalid combination of
1568c2ecf20Sopenharmony_ci					   values. */
1578c2ecf20Sopenharmony_ci#define ERRbadLink		68	/* (obsolete) */
1588c2ecf20Sopenharmony_ci#define ERRbadpermits		69	/* The access permissions specified for
1598c2ecf20Sopenharmony_ci					   a file or directory are not a valid
1608c2ecf20Sopenharmony_ci					   combination. */
1618c2ecf20Sopenharmony_ci#define ERRbadPID		70
1628c2ecf20Sopenharmony_ci#define ERRsetattrmode		71	/* attribute (mode) is invalid */
1638c2ecf20Sopenharmony_ci#define ERRpaused		81	/* Server is paused */
1648c2ecf20Sopenharmony_ci#define ERRmsgoff		82	/* reserved - messaging off */
1658c2ecf20Sopenharmony_ci#define ERRnoroom		83	/* reserved - no room for message */
1668c2ecf20Sopenharmony_ci#define ERRrmuns		87	/* reserved - too many remote names */
1678c2ecf20Sopenharmony_ci#define ERRtimeout		88	/* operation timed out */
1688c2ecf20Sopenharmony_ci#define ERRnoresource		89	/* No resources available for request
1698c2ecf20Sopenharmony_ci					   */
1708c2ecf20Sopenharmony_ci#define ERRtoomanyuids		90	/* Too many UIDs active on this session
1718c2ecf20Sopenharmony_ci					   */
1728c2ecf20Sopenharmony_ci#define ERRbaduid		91	/* The UID is not known as a valid user
1738c2ecf20Sopenharmony_ci					   */
1748c2ecf20Sopenharmony_ci#define ERRusempx		250	/* temporarily unable to use raw */
1758c2ecf20Sopenharmony_ci#define ERRusestd		251	/* temporarily unable to use either raw
1768c2ecf20Sopenharmony_ci					   or mpx */
1778c2ecf20Sopenharmony_ci#define ERR_NOTIFY_ENUM_DIR	1024
1788c2ecf20Sopenharmony_ci#define ERRnoSuchUser		2238	/* user account does not exist */
1798c2ecf20Sopenharmony_ci#define ERRaccountexpired	2239
1808c2ecf20Sopenharmony_ci#define ERRbadclient		2240	/* can not logon from this client */
1818c2ecf20Sopenharmony_ci#define ERRbadLogonTime		2241	/* logon hours do not allow this */
1828c2ecf20Sopenharmony_ci#define ERRpasswordExpired	2242
1838c2ecf20Sopenharmony_ci#define ERRnetlogonNotStarted	2455
1848c2ecf20Sopenharmony_ci#define ERRnosupport		0xFFFF
185