����14-4  linux/include/errno.h


  1 #ifndef _ERRNO_H

  2 #define _ERRNO_H

  3

  4 /*

  5  * ok, as I hadn't got any other source of information about

  6  * possible error numbers, I was forced to use the same numbers

  7  * as minix.

  8  * Hopefully these are posix or something. I wouldn't know (and posix

  9  * isn't telling me - they want $$$ for their f***ing standard).

 10  *

 11  * We don't use the _SIGN cludge of minix, so kernel returns must

 12  * see to the sign by themselves.

 13  *

 14  * NOTE! Remember to change strerror() if you change this file!

 15  */

    /*

     * ok��������û�еõ��κ������йس����ŵ����ϣ���ֻ��ʹ����minixϵͳ

     * ��ͬ�ij������ˡ�

     * ϣ����Щ��POSIX���ݵĻ�����һ���̶����������ģ��Ҳ�֪��������POSIX

     * û�и����� - Ҫ������ǵĻ쵰��׼��Ҫ��Ǯ����

     *

     * ����û��ʹ��minix������_SIGN�أ������ں˵ķ���ֵ�����Լ���������š�

     *

     * ע�⣡�����ı���ļ��Ļ�������ҲҪ�޸�strerror()������

     */

 16

    // ϵͳ�����Լ��ܶ�⺯������һ�������ֵ�Ա�ʾ����ʧ�ܻ���������ֵͨ��ѡ��-1����

    // ����һЩ�ض���ֵ����ʾ�������������ֵ��˵���������ˡ� �����Ҫ֪�����������ͣ�

    // ����Ҫ�鿴��ʾϵͳ�����ŵı���errno���ñ������� errno.h �ļ����������ڳ���ʼִ

    // ��ʱ�ñ���ֵ����ʼ��Ϊ0��

 17 extern int errno;

 18

    // �ڳ���ʱ��ϵͳ���û�ѳ����ŷ��ڱ���errno�У���ֵ����Ȼ�󷵻�-1����˳�������Ҫ֪

    // ���������ţ�����Ҫ�鿴errno��ֵ��

 19 #define ERROR           99                 // һ�����

 20 #define EPERM            1                 // ����û�����ɡ�

 21 #define ENOENT           2                 // �ļ���Ŀ¼�����ڡ�

 22 #define ESRCH            3                 // ָ���Ľ��̲����ڡ�

 23 #define EINTR            4                 // �жϵ�ϵͳ���á�

 24 #define EIO              5                 // ����/�������

 25 #define ENXIO            6                 // ָ���豸���ַ�����ڡ�

 26 #define E2BIG            7                 // �����б�̫����

 27 #define ENOEXEC          8                 // ִ�г����ʽ����

 28 #define EBADF            9                 // �ļ����(������)����

 29 #define ECHILD          10                 // �ӽ��̲����ڡ�

 30 #define EAGAIN          11                 // ��Դ��ʱ�����á�

 31 #define ENOMEM          12                 // �ڴ治�㡣

 32 #define EACCES          13                 // û������Ȩ�ޡ�

 33 #define EFAULT          14                 // ��ַ����

 34 #define ENOTBLK         15                 // ���ǿ��豸�ļ���

 35 #define EBUSY           16                 // ��Դ��æ��

 36 #define EEXIST          17                 // �ļ��Ѵ��ڡ�

 37 #define EXDEV           18                 // �Ƿ����ӡ�

 38 #define ENODEV          19                 // �豸�����ڡ�

 39 #define ENOTDIR         20                 // ����Ŀ¼�ļ���

 40 #define EISDIR          21                 // ��Ŀ¼�ļ���

 41 #define EINVAL          22                 // ������Ч��

 42 #define ENFILE          23                 // ϵͳ���ļ���̫�ࡣ

 43 #define EMFILE          24                 // ���ļ���̫�ࡣ

 44 #define ENOTTY          25                 // ��ǡ����IO���Ʋ���(û��tty�ն�)��

 45 #define ETXTBSY         26                 // ����ʹ�á�

 46 #define EFBIG           27                 // �ļ�̫��

 47 #define ENOSPC          28                 // �豸�������豸�Ѿ�û�пռ䣩��

 48 #define ESPIPE          29                 // ��Ч���ļ�ָ���ض�λ��

 49 #define EROFS           30                 // �ļ�ϵͳֻ����

 50 #define EMLINK          31                 // ����̫�ࡣ

 51 #define EPIPE           32                 // �ܵ�����

 52 #define EDOM            33                 // ��(domain)������

 53 #define ERANGE          34                 // ���̫��

 54 #define EDEADLK         35                 // ������Դ������

 55 #define ENAMETOOLONG    36                 // �ļ���̫����

 56 #define ENOLCK          37                 // û���������á�

 57 #define ENOSYS          38                 // ���ܻ�û��ʵ�֡�

 58 #define ENOTEMPTY       39                 // Ŀ¼���ա�

 59

 60 /* Should never be seen by user programs */

    /* �û�����Ӧ�ü������������д���� */

 61 #define ERESTARTSYS     512                // ����ִ��ϵͳ���á�

 62 #define ERESTARTNOINTR  513                // ����ִ��ϵͳ���ã����жϡ�

 63

 64 #endif

 65