#ifndef _ERRNO_H
#define _ERRNO_H

/*
* ok, as I hadn't got any other source of information about
* possible error numbers, I was forced to use the same numbers
* as minix.
* Hopefully these are posix or something. I wouldn't know (and posix
* isn't telling me - they want $$$ for their f***ing standard).
*
* We don't use the _SIGN cludge of minix, so kernel returns must
* see to the sign by themselves.
*
* NOTE! Remember to change strerror() if you change this file!
*/
/*
* okûеõκйسŵϣֻʹminix ϵͳ
* ͬĳˡ
* ϣЩPOSIX ݵĻһ̶ģҲ֪POSIX
* ûи - ҪǵĻ쵰׼ҪǮ
*
* ûʹminix _SIGN أں˵ķֵԼš
*
* ע⣡ıļĻҲҪ޸strerror()
*/

extern int errno;

#define ERROR 99		// һ
#define EPERM 1			// ûɡ
#define ENOENT 2		// ļĿ¼ڡ
#define ESRCH 3			// ָĽ̲ڡ
#define EINTR 4			// жϵĺá
#define EIO 5			// /
#define ENXIO 6			// ָ豸ַڡ
#define E2BIG 7			// б̫
#define ENOEXEC 8		// ִгʽ
#define EBADF 9			// ļ()
#define ECHILD 10		// ӽ̲ڡ
#define EAGAIN 11		// Դʱá
#define ENOMEM 12		// ڴ治㡣
#define EACCES 13		// ûȨޡ
#define EFAULT 14		// ַ
#define ENOTBLK 15		// ǿ豸ļ
#define EBUSY 16		// Դæ
#define EEXIST 17		// ļѴڡ
#define EXDEV 18		// Ƿӡ
#define ENODEV 19		// 豸ڡ
#define ENOTDIR 20		// Ŀ¼ļ
#define EISDIR 21		// Ŀ¼ļ
#define EINVAL 22		// Ч
#define ENFILE 23		// ϵͳļ̫ࡣ
#define EMFILE 24		// ļ̫ࡣ
#define ENOTTY 25		// ǡIO Ʋ(ûtty ն)
#define ETXTBSY 26		// ʹá
#define EFBIG 27		// ļ̫
#define ENOSPC 28		// 豸豸Ѿûпռ䣩
#define ESPIPE 29		// Чļָضλ
#define EROFS 30		// ļϵͳֻ
#define EMLINK 31		// ̫ࡣ
#define EPIPE 32		// ܵ
#define EDOM 33			// (domain)
#define ERANGE 34		// ̫
#define EDEADLK 35		// Դ
#define ENAMETOOLONG 36		// ļ̫
#define ENOLCK 37		// ûá
#define ENOSYS 38		// ܻûʵ֡
#define ENOTEMPTY 39		// Ŀ¼ա

#endif
