美文网首页
linux errno 对应参考及代码

linux errno 对应参考及代码

作者: PublicBook | 来源:发表于2019-01-23 10:45 被阅读0次

    linux errno 对应参考及代码

    errno 1:operation not permitted
    errno 2:no such file or directory
    errno 3:no such process
    errno 4:interrupted system call
    errno 5:input/output error
    errno 6:no such device or address
    errno 7:argument list too long
    errno 8:exec format error
    errno 9:bad file descriptor
    errno 10:no child processes
    errno 11:resource temporarily unavailable
    errno 12:cannot allocate memory
    errno 13:permission denied
    errno 14:bad address
    errno 15:block device required
    errno 16:device or resource busy
    errno 17:file exists
    errno 18:invalid cross-device link
    errno 19:no such device
    errno 20:not a directory
    errno 21:is a directory
    errno 22:invalid argument
    errno 23:too many open files in system
    errno 24:too many open files
    errno 25:inappropriate ioctl for device
    errno 26:text file busy
    errno 27:file too large
    errno 28:no space left on device
    errno 29:illegal seek
    errno 30:read-only file system
    errno 31:too many links
    errno 32:broken pipe
    errno 33:numerical argument out of domain
    errno 34:numerical result out of range
    errno 35:resource deadlock avoided
    errno 36:file name too long
    errno 37:no locks available
    errno 38:function not implemented
    errno 39:directory not empty
    errno 40:too many levels of symbolic links
    errno 41:errno 41
    errno 42:no message of desired type
    errno 43:identifier removed
    errno 44:channel number out of range
    errno 45:level 2 not synchronized
    errno 46:level 3 halted
    errno 47:level 3 reset
    errno 48:link number out of range
    errno 49:protocol driver not attached
    errno 50:no CSI structure available
    errno 51:level 2 halted
    errno 52:invalid exchange
    errno 53:invalid request descriptor
    errno 54:exchange full
    errno 55:no anode
    errno 56:invalid request code
    errno 57:invalid slot
    errno 58:errno 58
    errno 59:bad font file format
    errno 60:device not a stream
    errno 61:no data available
    errno 62:timer expired
    errno 63:out of streams resources
    errno 64:machine is not on the network
    errno 65:package not installed
    errno 66:object is remote
    errno 67:link has been severed
    errno 68:advertise error
    errno 69:srmount error
    errno 70:communication error on send
    errno 71:protocol error
    errno 72:multihop attempted
    errno 73:RFS specific error
    errno 74:bad message
    errno 75:value too large for defined data type
    errno 76:name not unique on network
    errno 77:file descriptor in bad state
    errno 78:remote address changed
    errno 79:can not access a needed shared library
    errno 80:accessing a corrupted shared library
    errno 81:.lib section in a.out corrupted
    errno 82:attempting to link in too many shared libraries
    errno 83:cannot exec a shared library directly
    errno 84:invalid or incomplete multibyte or wide character
    errno 85:interrupted system call should be restarted
    errno 86:streams pipe error
    errno 87:too many users
    errno 88:socket operation on non-socket
    errno 89:destination address required
    errno 90:message too long
    errno 91:protocol wrong type for socket
    errno 92:protocol not available
    errno 93:protocol not supported
    errno 94:socket type not supported
    errno 95:operation not supported
    errno 96:protocol family not supported
    errno 97:address family not supported by protocol
    errno 98:address already in use
    errno 99:cannot assign requested address
    errno 100:network is down
    errno 101:network is unreachable
    errno 102:network dropped connection on reset
    errno 103:software caused connection abort
    errno 104:connection reset by peer
    errno 105:no buffer space available
    errno 106:transport endpoint is already connected
    errno 107:transport endpoint is not connected
    errno 108:cannot send after transport endpoint shutdown
    errno 109:too many references: cannot splice
    errno 110:connection timed out
    errno 111:connection refused
    errno 112:host is down
    errno 113:no route to host
    errno 114:operation already in progress
    errno 115:operation now in progress
    errno 116:stale NFS file handle
    errno 117:structure needs cleaning
    errno 118:not a XENIX named type file
    errno 119:no XENIX semaphores available
    errno 120:is a named type file
    errno 121:remote I/O error
    errno 122:disk quota exceeded
    errno 123:no medium found
    errno 124:wrong medium type
    errno 125:operation canceled
    errno 126:required key not available
    errno 127:key has expired
    errno 128:key has been revoked
    errno 129:key was rejected by service
    errno 130:owner died
    errno 131:state not recoverable
    errno 132:operation not possible due to RF-kill

    go 代码

    package main
    
    import (
        "syscall"
        "strings"
        "fmt"
    )
    
    func main() {
        for i := 0; i <= 200; i++ {
            if !strings.HasPrefix(syscall.Errno(i).Error(), "errno ") {
                fmt.Printf("errno % 4d:%s\n", i, syscall.Errno(i).Error())
            }
        }
    }
    

    相关文章

      网友评论

          本文标题:linux errno 对应参考及代码

          本文链接:https://www.haomeiwen.com/subject/nfhjjqtx.html