Project

General

Profile

Statistics
| Branch: | Revision:

scoutos / prex-0.9.0 / usr / lib / libc / errno / errlst.c @ 03e9c04a

History | View | Annotate | Download (3.53 KB)

1
/*
2
 * Copyright (c) 1982, 1985, 1993
3
 *        The Regents of the University of California.  All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
7
 * are met:
8
 * 1. Redistributions of source code must retain the above copyright
9
 *    notice, this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright
11
 *    notice, this list of conditions and the following disclaimer in the
12
 *    documentation and/or other materials provided with the distribution.
13
 * 3. Neither the name of the University nor the names of its contributors
14
 *    may be used to endorse or promote products derived from this software
15
 *    without specific prior written permission.
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27
 * SUCH DAMAGE.
28
 */
29

    
30
#include <stdio.h>
31

    
32
const char *const sys_errlist[] = {
33
        "Undefined error: 0",                        /*  0 - ENOERROR */
34
        "Operation not permitted",                /*  1 - EPERM */
35
        "No such file or directory",                /*  2 - ENOENT */
36
        "No such process",                        /*  3 - ESRCH */
37
        "Interrupted system call",                /*  4 - EINTR */
38
        "Input/output error",                        /*  5 - EIO */
39
        "Device not configured",                /*  6 - ENXIO */
40
        "Argument list too long",                /*  7 - E2BIG */
41
        "Exec format error",                        /*  8 - ENOEXEC */
42
        "Bad file descriptor",                        /*  9 - EBADF */
43
        "No child processes",                        /* 10 - ECHILD */
44
        "Resource deadlock avoided",                /* 11 - EDEADLK */
45
        "Cannot allocate memory",                /* 12 - ENOMEM */
46
        "Permission denied",                        /* 13 - EACCES */
47
        "Bad address",                                /* 14 - EFAULT */
48
        "Block device required",                /* 15 - ENOTBLK */
49
        "Device busy",                                /* 16 - EBUSY */
50
        "File exists",                                /* 17 - EEXIST */
51
        "Cross-device link",                        /* 18 - EXDEV */
52
        "Operation not supported by device",        /* 19 - ENODEV */
53
        "Not a directory",                        /* 20 - ENOTDIR */
54
        "Is a directory",                        /* 21 - EISDIR */
55
        "Invalid argument",                        /* 22 - EINVAL */
56
        "Too many open files in system",        /* 23 - ENFILE */
57
        "Too many open files",                        /* 24 - EMFILE */
58
        "Inappropriate ioctl for device",        /* 25 - ENOTTY */
59
        "Text file busy",                        /* 26 - ETXTBSY */
60
        "File too large",                        /* 27 - EFBIG */
61
        "No space left on device",                /* 28 - ENOSPC */
62
        "Illegal seek",                                /* 29 - ESPIPE */
63
        "Read-only file system",                /* 30 - EROFS */
64
        "Too many links",                        /* 31 - EMLINK */
65
        "Broken pipe",                                /* 32 - EPIPE */
66

    
67
/* math software */
68
        "Numerical argument out of domain",        /* 33 - EDOM */
69
        "Result too large",                        /* 34 - ERANGE */
70

    
71
/* non-blocking and interrupt i/o */
72
        "Resource temporarily unavailable",        /* 35 - EAGAIN */
73

    
74
        "Operation timed out",                        /* 36 - ETIMEDOUT */
75
        "File name too long",                        /* 37 - ENAMETOOLONG */
76
        "Directory not empty",                        /* 38 - ENOTEMPTY */
77

    
78
/* quotas & mush */
79
        "Too many processes",                        /* 39 - EPROCLIM */
80
        "Function not implemented",                /* 40 - ENOSYS */
81
};
82
const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);