Home | History | Annotate | Line # | Download | only in libdos
      1  1.1  itohy /*
      2  1.1  itohy  *	dos_errno.h
      3  1.1  itohy  *	Human68k DOS call errors
      4  1.1  itohy  *
      5  1.6  itohy  *	written by ITOH Yasufumi
      6  1.1  itohy  *	public domain
      7  1.1  itohy  *
      8  1.6  itohy  *	$NetBSD: dos_errno.h,v 1.6 2011/02/21 02:31:59 itohy Exp $
      9  1.1  itohy  */
     10  1.1  itohy 
     11  1.1  itohy #ifndef X68K_DOS_ERRNO_H
     12  1.1  itohy #define X68K_DOS_ERRNO_H
     13  1.1  itohy 
     14  1.1  itohy #ifndef __ASSEMBLER__
     15  1.1  itohy #include <sys/cdefs.h>
     16  1.1  itohy 
     17  1.1  itohy extern int dos_errno;
     18  1.3  perry extern const int dos_nerr;
     19  1.1  itohy 
     20  1.5    dsl const char * __pure dos_strerror(int) __attribute__((const));
     21  1.1  itohy #endif
     22  1.1  itohy 
     23  1.1  itohy /*
     24  1.1  itohy  * The following block is used by  makstrerror.awk .
     25  1.1  itohy  * The error number shall be contiguous.
     26  1.1  itohy  */
     27  1.1  itohy 
     28  1.1  itohy /* dos_errlist begin */
     29  1.1  itohy #define DOS_ENOERROR	0	/* Undefined error: 0 */
     30  1.1  itohy #define DOS_EINVAL	1	/* Invalid argument */
     31  1.1  itohy #define DOS_ENOENT	2	/* No such file or directory */
     32  1.1  itohy #define DOS_ENOTDIR	3	/* Not a directory */
     33  1.1  itohy #define DOS_EMFILE	4	/* Too many open files */
     34  1.1  itohy #define DOS_EDIRVOL	5	/* Is a directory or volume label */
     35  1.1  itohy #define DOS_EBADF	6	/* Bad file descriptor */
     36  1.1  itohy #define DOS_EMCBCORRUPT	7	/* Memory control block corrupt */
     37  1.1  itohy #define DOS_ENOMEM	8	/* Cannot allocate memory */
     38  1.1  itohy #define DOS_EMCB	9	/* Illegal memory control block */
     39  1.1  itohy #define DOS_EENV	10	/* Invalid environment */
     40  1.1  itohy #define DOS_ENOEXEC	11	/* Exec format error */
     41  1.1  itohy #define DOS_EOPEN	12	/* Invalid access mode */
     42  1.1  itohy #define DOS_EFILENAME	13	/* Bad file name */
     43  1.1  itohy #define DOS_ERANGE	14	/* Argument out of range */
     44  1.1  itohy #define DOS_ENXIO	15	/* Device not configured */
     45  1.1  itohy #define DOS_EISCURDIR	16	/* Is a current directory */
     46  1.1  itohy #define DOS_EIOCTRL	17	/* No ioctrl for device */
     47  1.1  itohy #define DOS_EDIREND	18	/* No more files */
     48  1.1  itohy #define DOS_EROFILE	19	/* File is read-only */
     49  1.1  itohy #define DOS_EMKDIR	20	/* Can't mkdir -- file exists */
     50  1.1  itohy #define DOS_ENOTEMPTY	21	/* Directory not empty */
     51  1.1  itohy #define DOS_ERENAME	22	/* Can't rename -- file exists */
     52  1.1  itohy #define DOS_ENOSPC	23	/* No space left on device */
     53  1.1  itohy #define DOS_EDIRFUL	24	/* No more files in the directory */
     54  1.1  itohy #define DOS_ESEEK	25	/* Illegal seek */
     55  1.1  itohy #define DOS_ESUPER	26	/* Already in supervisor */
     56  1.1  itohy #define DOS_EPRNAME	27	/* Duplicated thread name */
     57  1.1  itohy #define DOS_EROBUF	28	/* Buffer is read-only */
     58  1.1  itohy #define DOS_EPROCFULL	29	/* No more processes */
     59  1.1  itohy #define DOS_E30		30	/* Unknown error: 30 */
     60  1.1  itohy #define DOS_E31		31	/* Unknown error: 31 */
     61  1.1  itohy #define DOS_ENOLCK	32	/* No locks available */
     62  1.1  itohy #define DOS_ELOCKED	33	/* File is locked */
     63  1.1  itohy #define DOS_EBUSY	34	/* Device busy */
     64  1.1  itohy #define DOS_ELOOP	35	/* Too many levels of symbolic links */
     65  1.1  itohy #define DOS_EEXIST	36	/* File exists */
     66  1.1  itohy #define DOS_EBUFOVER	37	/* Buffer overflow */
     67  1.1  itohy #define DOS_E38		38	/* Unknown error: 38 */
     68  1.1  itohy #define DOS_E39		39	/* Unknown error: 39 */
     69  1.1  itohy #define DOS_ESRCH	40	/* No such process */
     70  1.1  itohy /* dos_errlist end */
     71  1.1  itohy 
     72  1.1  itohy #define	DOS_ELAST	40	/* largest DOS errno */
     73  1.2  itohy 
     74  1.2  itohy /* internal use only */
     75  1.2  itohy #define _DOS_EEXIST	80	/* File exists (from DOS call) */
     76  1.1  itohy 
     77  1.1  itohy #endif /* X68K_DOS_ERRNO_H */
     78