fs/smb/client/smberr.h

Source file repositories/reference/linux-study-clean/fs/smb/client/smberr.h

File Facts

System
Linux kernel
Corpus path
fs/smb/client/smberr.h
Extension
.h
Size
7887 bytes
Lines
299
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct smb_to_posix_error {
	__u16 smb_err;
	int posix_code;
};

/* The request was successful. */
#define SUCCESS	0x00
/* Error is from the core DOS operating system set */
#define ERRDOS	0x01
/* Error is generated by the file server daemon */
#define ERRSRV	0x02
/* Error is a hardware error. */
#define ERRHRD	0x03
/* Command was not in the "SMB" format. */
#define ERRCMD	0xFF

/* The following error codes may be generated with the SUCCESS error class.*/

/*#define SUCCESS	0	The request was successful. */

/*
 * The following error codes may be generated with the ERRDOS error class.
 * The comment at the end of each definition indicates the POSIX error
 * code; it is used to generate the `mapping_table_ERRDOS` array.
 */

/*
 * Invalid function. The server did not
 * recognize or could not perform a
 * system call generated by the server,
 * e.g., set the DIRECTORY attribute on
 * a data file, invalid seek mode.
 */
#define ERRbadfunc		1	// -EINVAL
/*
 * File not found. The last component
 * of a file's pathname could not be
 * found.
 */
#define ERRbadfile		2	// -ENOENT
/*
 * Directory invalid. A directory
 * component in a pathname could not be
 * found.
 */
#define ERRbadpath		3	// -ENOTDIR
/*
 * Too many open files. The server has
 * no file handles available.
 */
#define ERRnofids		4	// -EMFILE
/*
 * Access denied, the client's context
 * does not permit the requested
 * function. This includes the
 * following conditions: invalid rename
 * command, write to Fid open for read
 * only, read on Fid open for write
 * only, attempt to delete a non-empty
 * directory
 */
#define ERRnoaccess		5	// -EACCES
/*
 * Invalid file handle. The file handle
 * specified was not recognized by the
 * server.
 */
#define ERRbadfid		6	// -EBADF
/* Memory control blocks destroyed. */
#define ERRbadmcb		7	// -EIO
/*
 * Insufficient server memory to
 * perform the requested function.
 */
#define ERRnomem		8	// -EREMOTEIO
/* Invalid memory block address. */
#define ERRbadmem		9	// -EFAULT
/* Invalid environment. */
#define ERRbadenv		10	// -EFAULT
/* Invalid format. */
#define ERRbadformat		11	// -EINVAL
/* Invalid open mode. */
#define ERRbadaccess		12	// -EACCES
/*
 * Invalid data (generated only by
 * IOCTL calls within the server).
 */
#define ERRbaddata		13	// -EIO
/* Invalid drive specified. */
#define ERRbaddrive		15	// -ENXIO

Annotation

Implementation Notes