write.2
来自「UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱」· 2 代码 · 共 46 行
2
46 行
.th WRITE II 8/5/73.sh NAMEwrite \*- write on a file.sh SYNOPSIS(write = 4.).br(file descriptor in r0).br.ft Bsys write; buffer; nbytes.s3write(fildes, buffer, nbytes).brchar *buffer;.ft R.sh DESCRIPTIONA file descriptor is a word returned from asuccessful.it open,.it creat,.it dup,or.it pipecall..s3.it Bufferis the address of.it nbytescontiguousbytes which are written on the output file.The number of characters actually written is returned (in r0).It should be regarded as an errorif this is not the same as requested..s3Writes which are multiplesof 512 characters long and begin on a 512-byte boundaryin the fileare more efficient than any others..sh "SEE ALSO"creat (II), open (II), pipe (II).sh DIAGNOSTICSThe error bit(c-bit) is set on an error: bad descriptor, buffer address, orcount; physical I/O errors.From C, a returned value of \*-1 indicates an error.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?