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