⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtio.4

📁 Unix操作系统minix 2.0源码
💻 4
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:08:04 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def    [psize 0 cheight slant sin slant cos div mul cheight 0 0]    makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig {	/SavedState save def	userdict maxlength dict begin	currentpoint transform	DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap		setlinewidth setmatrix	itransform moveto	/ury exch def	/urx exch def	/lly exch def	/llx exch def	/y exch 72 mul resolution div def	/x exch 72 mul resolution div def		currentpoint /cy exch def /cx exch def	/sx x urx llx sub div def	/sy y ury lly sub div def	sx sy scale	cx sx div llx sub	cy sy div ury sub translate		/DefFigCTM matrix currentmatrix def	/initmatrix {		DefFigCTM setmatrix	} def	/defaultmatrix {		DefFigCTM exch copy	} def	/initgraphics {		DocumentInitState setmiterlimit setgray setdash 			setlinejoin setlinecap setlinewidth setmatrix		DefFigCTM setmatrix	} def	/showpage {		initgraphics	} def}bind  def/clipFig {	currentpoint 6 2 roll	newpath 4 copy	4 2 roll moveto	6 -1 roll exch lineto	exch lineto	exch lineto	closepath clip	newpath	moveto}bind  def/doclip { llx lly urx ury clipFig } def/endFig {	end SavedState restore}bind  def/globalstart {	fontnum psize slant height resolution currentpoint 	pagesave restore gsave }bind  def/globalend {	grestore moveto	/resolution exch def /height exch def	/slant exch def /psize exch def /fontnum exch def	F	/pagesave save def}bind  def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne   { exch newdict 3 1 roll put }   { pop pop } % Ignore FID   ifelse} forallnewdict begin/Encoding  tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval  cvn load  def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(MTIO)S986(\()S1028(4)S1086(\))S2696(Eighth)S(Edition)296 2989 A4861(MTIO)S5127(\()S5169(4)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(mtio)S10 R-11289(-)S10 R1371(magnetic)S1765(tape)S1958(commands)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B1080(#include)S1482(<sys/types.h>)S1488 V1080(#include)S1482(<sys/mtio.h>)S1608 V1080(#include)S1482(<sys/ioctl.h>)S1776 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S1896 V10 R1080(The)S1268(magnetic)S1668(tape)S1867(devices)S2200(described)S2618(in)S10 B2728(sd)S10 R2823(\(4\))S2973(may)S3178(be)S3305(sent)S3499(commands)S3966(or)S4082(queried)S4416(for)S4566(their)S4783(status)S5044(using)S2016 V1080(the)S1228(following)S1644(ioctl)S1848(calls:)S2184 V10 B1440(ioctl)S10 R1625(\()S10 I1659(fd)S10 R1737(,)S10 B1787(MTIOCTOP)S10 R2346(,)S2396(&)S10 B2474(struct)S2752(mtop)S10 R2976(\))S2304 V10 B1440(ioctl)S10 R1625(\()S10 I1659(fd)S10 R1737(,)S10 B1787(MTIOCGET)S10 R2351(,)S2401(&)S10 B2479(struct)S2757(mtget)S10 R3004(\))S2472 V1080(The)S1262(struct)S1511(mtop,)S1767(struct)S2016(mtget)S2270(and)S2440(associated)S(de\256nitions)424 2879 A3328(are)S3477(de\256ned)S3798(in)S3901(<sys/mtio.h>)S4455(as)S4564(follows:)S2640 V1080(/*)S1183(Tape)S1410(operations:)S1882(ioctl\(fd,)S2229(MTIOCTOP,)S2795(&struct)S3122(mtop\))S3387(*/)S2880 V1080(struct)S1329(mtop)S1560({)S3000 V1280(short)S(mt_op;)284 1630 A2380(/*)S2483(Operation)S2911(\(MTWEOF,)S3432(etc.\))S3634(*/)S3120 V1280(int)S(mt_count;)407 1630 A2380(/*)S2483(Repeat)S(count.)248 2788 A3061(*/)S3240 V1080(};)S3480 V1080(#de\256ne)S1401(MTWEOF)S1930(0)S2180(/*)S2283(Write)S2538(End-Of-File)S3057(Marker)S3379(*/)S3600 V1080(#de\256ne)S(MTFSF)319 1401 A1930(1)S2180(/*)S2283(Forward)S(Space)241 2650 A2916(File)S3098(mark)S3330(*/)S3720 V1080(#de\256ne)S1401(MTBSF)S1930(2)S2180(/*)S2283(Backward)S(Space)241 2717 A2983(File)S3165(mark)S3397(*/)S3840 V1080(#de\256ne)S1401(MTFSR)S1930(3)S2180(/*)S2283(Forward)S(Space)241 2650 A2916(Record)S3232(*/)S3960 V1080(#de\256ne)S1401(MTBSR)S1930(4)S2180(/*)S2283(Backward)S(Space)241 2717 A2983(Record)S3299(*/)S4080 V1080(#de\256ne)S1401(MTREW)S1930(5)S2180(/*)S2283(Rewind)S2621(tape)S2814(*/)S4200 V1080(#de\256ne)S1401(MTOFFL)S1930(6)S2180(/*)S2283(Rewind)S2621(and)S2791(take)S2984(Of\257ine)S3295(*/)S4320 V1080(#de\256ne)S1401(MTNOP)S1930(7)S2180(/*)S2283(No-Operation,)S2893(set)S3030(status)S3284(only)S3487(*/)S4440 V1080(#de\256ne)S(MTRETEN)477 1401 A1930(8)S2180(/*)S2283(Retension)S2710(\(completely)S3216(wind)S3442(and)S3612(rewind\))S3951(*/)S4560 V1080(#de\256ne)S1401(MTERASE)S1930(9)S2180(/*)S2283(Erase)S2533(the)S2681(tape)S2874(and)S3044(rewind)S3349(*/)S4680 V1080(#de\256ne)S1401(MTEOM)S1930(10)S2180(/*)S(Position)329 2283 A2637(at)S2735(End-Of-Media)S3354(*/)S4800 V1080(#de\256ne)S1401(MTMODE)S1930(11)S2180(/*)S2283(Select)S2555(tape)S2748(density)S3063(*/)S4920 V1080(#de\256ne)S1401(MTBLKZ)S1930(12)S2180(/*)S2283(Select)S2555(tape)S2748(block)S2996(size)S3178(*/)S5160 V1080(/*)S1183(Tape)S1410(status:)S1692(ioctl\(fd,)S2039(MTIOCGET,)S2611(&struct)S2938(mtget\))S3226(*/)S5400 V1080(struct)S1329(mtget)S1583({)S5520 V1280(short)S1630(mt_type;)S2380(/*)S2483(Type)S2715(of)S2824(tape)S3017(device.)S3330(*/)S5760 V1280(/*)S1383(Device)S1694(dependent)S2132("registers".)S2606(*/)S5880 V1280(short)S1630(mt_dsreg;)S2380(/*)S2483(Drive)S2738(status)S2992(register.)S3345(*/)S6000 V1280(short)S1630(mt_erreg;)S2380(/*)S2483(Error)S2722(register.)S3075(*/)S6240 V1280(/*)S1383(Misc)S1609(info.)S1821(*/)S6360 V1280(off_t)S1630(mt_resid;)S2380(/*)S2483(Residual)S(count.)248 2860 A3133(*/)S6480 V1280(off_t)S1630(mt_\256leno;)S2380(/*)S2483(Current)S2816(File)S2998(Number.)S3378(*/)S6600 V1280(off_t)S(mt_blkno;)412 1630 A2380(/*)S2483(Current)S2816(Block)S3081(Number)S3436(within)S3718(\256le.)S3897(*/)S6720 V1280(off_t)S1630(mt_blksize;)S2380(/*)S2483(Current)S2816(block)S3064(size.)S3271(*/)S6840 V1080(};)S7128 V1080(See)S10 B1261(mt)S10 R1379(\(1\))S1532(for)S1685(a)S1765(detailed)S2119(description)S2601(on)S2736(what)S(each)185 2967 A3187(operation)S3602(does.)S3871(The)S4063(mt_type)S4428(\256eld)S4643(is)S4746(always)S5062(zero,)S7248 V1080(there)S1313(is)S1411(no)S1542(use)S1707(for)S1856(it)S1943(yet.)S2147(Mt_dsreg)S2563(is)S2661(0)S2742(\(OK\),)S3012(1)S3093(\(Error\),)S3431(or)S3545(2)S3625(\(EOF)S(encountered.\))551 3880 A4486(Mt_erreg)S4891(holds)S5138(the)S7368 V1080(SCSI)S1330(sense)S1585(key)S1767(of)S1888(the)S2048(last)S2225(operation.)S2693(Mt_blksize)S3183(is)S3288(the)S3449(current)S3773(tape)S3979(block)S4240(size)S4435(in)S4551(bytes,)S4826(zero)S5038(if)S5138(the)S7488 V1080(block)S1328(size)S1510(is)S1602(variable.)S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(MTIO)S986(\()S1028(4)S1086(\))S2696(Eighth)S(Edition)296 2989 A4861(MTIO)S5127(\()S5169(4)S5227(\))S960 V1080(Note)S1306(that)S1487(one)S1662(can)S1832(issue)S2064(these)S2302(commands)S2768(on)S2899(a)S2975(\256le)S3135(descriptor)S3569(that)S3751(is)S3849(in)S3958(use)S4123(to)S4232(read)S4437(or)S4552(write)S4791(data,)S5015(some-)S1080 V1080(thing)S1315(that)S10 B1495(mt)S10 R1642(can't)S1872(do.)S2050(So)S(you)150 2184 A2362(can)S2530(add)S2703(eof)S2860(markers)S3213(in)S3319(the)S3470(middle)S3777(of)S3889(an)S4012(output)S4296(stream,)S4618(or)S4730(get)S4881(the)S5032(status)S1200 V1080(of)S1189(a)S1259(device)S1547(before)S1830(a)S1900(rewind-on-close)S2580(tape)S2773(rewinds.)S1368 V1080(The)S1262(driver)S(will)157 1528 A1710(automatically)S2283(add)S2453(an)S2573(end)S2743(of)S2852(\256le)S3006(marker)S3317(to)S3420(a)S3490(tape)S3683(that)S3859(is)S(written)286 3952 A4264(to)S4368(if)S(you)150 4456 A4632(execute)S4966(a)S(space)224 5037 A1488 V1080(command.)S1551(If)S(you)150 1644 A1819(write)S2052(eof)S2206(markers)S(yourself)330 2556 A2911(then)S3109(the)S3257(driver)S(will)157 3523 A3705(not)S3858(add)S4028(one)S4198(extra)S4425(on)S4550(close.)S1656 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S1776 V10 B1080(mt)S10 R1198(\(1\),)S10 B1366(sd)S10 R1461(\(4\).)S1944 V9 R720(A)S722(AU)S790(UT)S858(TH)S916(HO)S984(OR)S1052(R)S2064 V10 R1080(Kees)S1307(J.)S1396(Bot)S1566(\(kjb@cs.vu.nl\))S7903 V720(September)S1176(13,)S(1996)200 1326 A4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -