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