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

📄 sd.4

📁 Unix操作系统minix 2.0源码
💻 4
📖 第 1 页 / 共 2 页
字号:
1200(ap)S1247(pe)S1299(es)S1346(s)S4704 V1080(There)S1354(are)S1517(two)S1707(types)S1958(of)S2081(SCSI)S2333(tapes)S2579(drives)S(supported)396 2864 A3299(by)S3438(the)S3600(driver:)S3908(\256xed)S4148(or)S4271(variable)S4635(block)S4897(size)S5093(tape)S4824 V1080(drives.)S1409(Examples)S1839(of)S1956(the)S2112(\256rst)S2302(kind)S2513(are)S2670(cartridge)S3062(tapes,)S3327(with)S3539(a)S3617(\256xed)S(512)150 3851 A4034(bytes)S4279(block)S4535(size.)S4775(An)S4931(Exabyte)S4944 V1080(tape)S1280(drive)S1519(has)S1685(a)S1762(variable)S2119(block)S2374(size,)S2588(with)S2800(a)S2878(minimum)S3301(of)S3418(1)S3501(byte)S3707(and)S3885(a)S3963(maximum)S4403(of)S(245760)300 4520 A4853(bytes)S5098(\(see)S5064 V1080(the)S1248(documentation)S1890(of)S2019(such)S2247(devices.\))S2677(The)S2878(maximum)S3329(is)S3440(truncated)S3859(to)S(32767)250 3981 A4275(bytes)S4531(for)S4693(Minix-86)S5116(and)S5184 V(61440)250 1080 A1355(bytes)S1592(for)S1735(Minix-vmd,)S(because)319 2242 A2586(the)S2734(driver)S3000(can't)S3227(move)S3475(more)S3707(bytes)S3944(in)S4047(a)S4117(single)S4382(request.)S5352 V1080(A)S1182(read)S1385(or)S1498(write)S1736(to)S1844(a)S1919(\256xed)S2150(block)S2403(size)S2590(tape)S2788(must)S3013(be)S3138(a)S3213(precise)S(multiple)335 3529 A3894(of)S4008(the)S4161(block)S4414(size,)S4626(any)S4801(other)S(count)223 5038 A5472 V1080(gives)S1325(results)S1621(in)S1732(an)S1860(I/O)S2028(error.)S2308(A)S2414(read)S2621(from)S2850(a)S2927(variable)S3284(block)S3539(sized)S3778(tape)S3978(must)S4205(be)S4332(large)S(enough)295 4566 A4893(to)S(accept)258 5003 A5592 V1080(the)S1244(block)S1508(that)S1700(is)S1808(read,)S2048(otherwise)S2481(an)S2617(I/O)S2793(error)S(will)157 3031 A3229(be)S3365(returned.)S3792(A)S3906(write)S4155(can)S4336(be)S4472(any)S4658(size)S(above)240 4856 A5138(the)S5712 V1080(minimum,)S1526(creating)S1882(a)S1958(block)S2212(of)S2327(that)S2509(size.)S2747(If)S2846(the)S3000(write)S(count)223 3239 A3492(is)S3589(larger)S3855(than)S4058(the)S4211(maximum)S4648(block)S4901(size)S5088(then)S5832 V1080(more)S1314(blocks)S1603(are)S(written)286 1754 A(until)184 2067 A2278(the)S(count)223 2428 A2678(becomes)S3057(zero.)S3308(The)S3492(last)S3659(block)S3909(must)S4132(be)S4255(larger)S4519(than)S4720(the)S4871(minimum)S5952 V1080(of)S1189(course.)S1527(\(This)S1765(minimum)S2180(is)S2272(often)S2504(as)S2613(small)S2856(as)S2965(1)S3040(byte,)S3263(as)S3372(for)S3515(the)S3663(Exabyte.\))S6120 V1080(The)S10 B1263(mt)S1408(blksize)S10 R1732(command)S2155(may)S2355(be)S2477(used)S2688(to)S2793(select)S3050(a)S3122(\256xed)S3350(block)S3600(size)S3784(for)S3929(a)S4001(variable)S4353(block)S4603(sized)S4837(tape.)S5082(This)S6240 V(will)157 1080 A1266(speed)S1524(up)S1653(I/O)S1817(considerably)S2360(for)S2507(small)S2753(block)S3004(sizes.)S3278(\(Some)S3569(systems)S3915(can)S4083(only)S4289(use)S4451(\256xed)S4680(mode)S4931(and)S(will)157 5104 A6360 V1080(write)S1313(an)S1433(Exabyte)S1788(tape)S1981(with)S(1024)200 2185 A2410(byte)S2608(blocks,)S2920(which)S3191(read)S3390(very)S3594(slow)S3809(in)S3912(variable)S4262(mode.\))S6528 V1080(A)S1185(tape)S1385(is)S1484(a)S1561(sequence)S1962(of)S2078(blocks)S2372(and)S2549(\256lemarks.)S3006(A)S3111(tape)S3311(may)S3516(be)S3643(opened)S3965(and)S4142(blocks)S4436(may)S4641(be)S4769(read)S4976(from)S5205(it)S6648 V1080(upto)S1286(a)S1359(\256lemark,)S1748(after)S1962(that)S2141(all)S2270(further)S2573(reads)S2814(return)S3083(0.)S3211(After)S3453(the)S3604(tape)S3800(is)S3895(closed)S4180(and)S4352(reopened)S4748(one)S4920(can)S5087(read)S6768 V1080(the)S1241(blocks)S1541(following)S1970(the)S2131(\256lemark)S2505(if)S2605(using)S2860(a)S(non-rewinding)592 2943 A3574(device.)S3926(This)S4144(makes)S4440(the)S4602(tape)S(look)178 4809 A5026(like)S5216(a)S6888 V1080(sequence)S1474(of)S1583(\256les.)S7056 V1080(If)S1186(a)S1269(tape)S1475(has)S1647(been)S(written)286 1875 A2199(to)S2315(or)S2437(opened)S2765(in)S2881(write-only)S3339(mode,)S3625(then)S3836(a)S3919(\256lemark)S4293(is)S(written)286 4399 A4724(if)S4825(the)S4987(tape)S5194(is)S7176 V1080(closed)S1368(or)S1483(if)S1576(a)S(space)224 1652 A1907(command)S2334(is)S2432(issued.)S2764(No)S2918(extra)S3151(\256lemark)S3518(is)S(written)286 3616 A3933(if)S4026(the)S4180(drive)S4418(is)S4516(instructed)S4944(to)S5053(write)S7296 V1080(\256lemarks.)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(SD)S857(\()S899(4)S957(\))S2696(Eighth)S(Edition)296 2989 A4990(SD)S5127(\()S5169(4)S5227(\))S960 V870(R)S872(Ra)S941(aw)S988(w)S1104(G)S1106(Ge)S1181(en)S1228(ne)S1280(er)S1327(ri)S1363(ic)S1393(c)S1481(D)S1483(De)S1558(ev)S1605(vi)S1657(ic)S1687(ce)S1734(es)S1781(s)S1080 V1080(Under)S1363(Minix-vmd)S1851(one)S2027(can)S2198(use)S2363(the)S2517(generic)S2846(SCSI)S3091(devices)S3425(to)S3535(program)S3908(a)S3985(SCSI)S4230(device)S4525(entirely)S4865(from)S5093(user)S1200 V1080(mode.)S1389(The)S1582(disk)S1785(and)S1966(tape)S2170(devices)S2508(probe)S2773(for)S2927(devices)S3265(when)S3519(opened,)S3870(start)S4079(disks)S4320(and)S4500(load)S4708(tapes,)S4975(but)S5138(the)S1320 V1080(generic)S1403(devices)S1731(do)S1857(nothing)S2189(of)S2299(this.)S2520(Given)S2792(an)S2914(open)S3136(\256le)S3292(descriptor)S3722(to)S3827(any)S3999(SCSI)S4239(character)S4637(device)S4927(\(not)S5116(just)S1440 V1080(the)S1228(generic)S1550(devices\))S1911(one)S2081(can)S2246(use)S2405(the)S2553(following)S(ioctl:)207 2969 A1608 V1440(ioctl\(fd,)S1787(SCIOCCMD,)S2363(&scsicmd\))S1776 V1080(The)S1262(structure)S1640(whose)S1922(address)S2249(is)S2341(passed)S2634(as)S2743(the)S2891(third)S3106(argument)S3511(is)S3603(de\256ned)S3924(in)S4027(<sys/scsi.h>)S4548(as)S4657(follows:)S1944 V1440(struct)S1689(scsicmd)S2038({)S2064 V1800(void)S2160(*cmd;)S2184 V1800(size_t)S2160(cmdlen;)S2304 V1800(void)S(*buf;)212 2160 A2424 V1800(size_t)S2160(bu\257en;)S2544 V1800(void)S2160(*sense;)S2664 V1800(size_t)S2160(senselen;)S2784 V1800(int)S2160(dir;)S2904 V1440(};)S3072 V10 B1080(Cmd)S10 R1325(and)S10 B1502(cmdlen)S10 R1848(hold)S2058(the)S2213(address)S2547(and)S2724(length)S3007(of)S3123(an)S3250(object)S3528(holding)S3867(a)S(Group)257 3945 A4235(0)S4318(or)S(Group)257 4435 A4725(1)S4808(SCSI)S5054(com-)S3192 V1080(mand.)S1379(The)S1562(next)S1761(two)S1938(\256elds)S2182(describe)S2544(a)S2615(buffer)S2888(of)S2998(at)S3097(most)S3318(8)S(kilobytes)368 3394 A3788(used)S3998(in)S4102(the)S4251(data)S4445(in)S4549(or)S4658(out)S4811(phase.)S10 B5115(Dir)S3312 V10 R1080(is)S1172(0)S1247(if)S1335(data)S1529(is)S1622(to)S1726(be)S1847(read)S2047(from)S2269(the)S2418(device,)S2732(1)S2808(if)S2896(data)S3090(is)S(written)286 3183 A3495(to)S3599(the)S3748(device.)S4087(If)S4181(the)S4330(ioctl)S(succeeds)358 4535 A4919(then)S5118(0)S5194(is)S3432 V1080(returned,)S1467(otherwise)S1885(-1)S1995(with)S10 B(errno)241 2200 A10 R2467(set)S2605(to)S10 B2709(EIO)S10 R2919(and)S3090(the)S3239(request)S3556(sense)S3800(info)S3988(returned)S4350(in)S4454(the)S4603(buffer)S4875(described)S3552 V1080(by)S1213(the)S1369(sense)S1620(and)S1798(senselen)S2172(\256elds.)S2473(If)S2574(the)S2730(sense)S2981(key)S3160(is)S3261(zero)S3469(on)S3603(error)S3834(then)S4041(a)S4120(host)S4321(adapter)S4652(error)S4883(occurred,)S3672 V1080(this)S1250(means)S1532(that)S1708(the)S1856(device)S2144(is)S2236(most)S2456(likely)S2710(turned)S2992(off)S3135(or)S3244(not)S3397(present.)S3840 V9 R720(F)S722(FI)S774(IL)S807(LE)S865(ES)S923(S)S3960 V10 R1080(/dev/sd[0)S10 R-11454(-)S10 R1511(9],)S1645(/dev/sd[1)S10 R-12019(-)S10 R2076(46)S10 R-12176(-)S10 R2233(9][a)S10 R-12396(-)S10 R2453(d])S3080(Usual)S3340(disk)S3532(devices.)S4128 V1080(/dev/rst4,)S1482(/dev/nrst4)S3080(Usual)S3340(tape)S3533(device.)S4296 V1080(/dev/rsg[0)S10 R-11488(-)S10 R1545(7])S3080(Raw)S3290(generic)S3612(devices.)S4464 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S4584 V10 B1080(hd)S10 R1192(\(4\),)S10 B1360(mt)S10 R1478(\(1\),)S10 B1646(eject)S10 R1849(\(1\),)S10 B2017(mtio)S10 R2213(\(4\),)S10 B2381(dd)S10 R2493(\(1\).)S4752 V9 R720(A)S722(AU)S790(UT)S858(TH)S916(HO)S984(OR)S1052(R)S4872 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%%Pages: 2

⌨️ 快捷键说明

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