linux errno 對應(yīng)參考及代碼

linux errno 對應(yīng)參考及代碼

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())
        }
    }
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末状勤,一起剝皮案震驚了整個濱河市抹蚀,隨后出現(xiàn)的幾起案子骂因,更是在濱河造成了極大的恐慌窟感,老刑警劉巖箱蝠,帶你破解...
    沈念sama閱讀 219,427評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異吃粒,居然都是意外死亡巧娱,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,551評論 3 395
  • 文/潘曉璐 我一進店門逾滥,熙熙樓的掌柜王于貴愁眉苦臉地迎上來峰档,“玉大人,你說我怎么就攤上這事寨昙〖パ玻” “怎么了?”我有些...
    開封第一講書人閱讀 165,747評論 0 356
  • 文/不壞的土叔 我叫張陵舔哪,是天一觀的道長欢顷。 經(jīng)常有香客問我,道長捉蚤,這世上最難降的妖魔是什么抬驴? 我笑而不...
    開封第一講書人閱讀 58,939評論 1 295
  • 正文 為了忘掉前任炼七,我火速辦了婚禮,結(jié)果婚禮上布持,老公的妹妹穿的比我還像新娘豌拙。我一直安慰自己,他們只是感情好题暖,可當我...
    茶點故事閱讀 67,955評論 6 392
  • 文/花漫 我一把揭開白布按傅。 她就那樣靜靜地躺著,像睡著了一般胧卤。 火紅的嫁衣襯著肌膚如雪逞敷。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,737評論 1 305
  • 那天灌侣,我揣著相機與錄音推捐,去河邊找鬼。 笑死侧啼,一個胖子當著我的面吹牛牛柒,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播痊乾,決...
    沈念sama閱讀 40,448評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼皮壁,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了哪审?” 一聲冷哼從身側(cè)響起蛾魄,我...
    開封第一講書人閱讀 39,352評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎湿滓,沒想到半個月后滴须,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,834評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡叽奥,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,992評論 3 338
  • 正文 我和宋清朗相戀三年扔水,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片朝氓。...
    茶點故事閱讀 40,133評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡魔市,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出赵哲,到底是詐尸還是另有隱情待德,我是刑警寧澤,帶...
    沈念sama閱讀 35,815評論 5 346
  • 正文 年R本政府宣布枫夺,位于F島的核電站将宪,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜涧偷,卻給世界環(huán)境...
    茶點故事閱讀 41,477評論 3 331
  • 文/蒙蒙 一簸喂、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧燎潮,春花似錦喻鳄、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,022評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至爪喘,卻和暖如春颜曾,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背秉剑。 一陣腳步聲響...
    開封第一講書人閱讀 33,147評論 1 272
  • 我被黑心中介騙來泰國打工泛豪, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人侦鹏。 一個月前我還...
    沈念sama閱讀 48,398評論 3 373
  • 正文 我出身青樓诡曙,卻偏偏與公主長得像,于是被迫代替她去往敵國和親略水。 傳聞我的和親對象是個殘疾皇子价卤,可洞房花燭夜當晚...
    茶點故事閱讀 45,077評論 2 355

推薦閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,336評論 0 10
  • mean to add the formatted="false" attribute?.[ 46% 47325/...
    ProZoom閱讀 2,699評論 0 3
  • 轉(zhuǎn)自:https://blog.csdn.net/kofiory/article/details/5790409 ...
    009419b5a3fd閱讀 1,306評論 0 0
  • Swift 是一門開發(fā) iOS, macOS, watchOS 和 tvOS 應(yīng)用的新語言。然而渊涝,如果你有 C 或...
    XLsn0w閱讀 922評論 2 1
  • 很多人把張騫出使西域比作現(xiàn)實生活中的《西游記》慎璧,13年西行所經(jīng)歷的艱難困苦也不比唐僧師徒西天取經(jīng)少到哪兒去,但文化...
    小謝的故事閱讀 143評論 0 0