home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / unix_c / sysadmin / with.tar < prev   
Tape Archive  |  1989-03-04  |  24.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: Tape Archive (archive/tar).

You can browse this item here: with.tar

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Tape Archive (archive/tar) magic Supported
100% file tar archive default
99% file tar archive (V7), file with/, mode 755 , uid 243 , gid 12 , size 0 , seconds 4404057731 default
98% file data default
100% TrID Sybase iAnywhere database files default (weak)
100% lsar Tar default
100% gt2 TAR Archiv gefunden (Auflistung ist deaktiviert) default
100% disktype Pre-POSIX tar archive default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 77 69 74 68 2f 00 00 00 | 00 00 00 00 00 00 00 00 |with/...|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 35 35 20 00 20 20 20 32 |.... 7|55 . 2|
|00000070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 34 34 30 34 30 35 37 | 0 | 4404057|
|00000090| 37 33 31 20 20 20 34 37 | 37 33 00 20 00 00 00 00 |731 47|73. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 77 69 74 68 2f 53 68 61 | 72 46 69 6c 65 2e 48 65 |with/Sha|rFile.He|
|00000210| 61 64 65 72 73 00 00 00 | 00 00 00 00 00 00 00 00 |aders...|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000270| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000280| 20 20 20 31 34 31 32 20 | 20 34 34 30 34 30 35 37 | 1412 | 4404057|
|00000290| 37 33 33 20 20 31 30 30 | 35 32 00 20 00 00 00 00 |733 100|52. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 3d 3d 3d 20 77 69 74 68 | 2e 73 68 61 72 20 3d 3d |=== with|.shar ==|
|00000410| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000420| 3d 3d 3d 3d 3d 3d 3d 0a | 46 72 6f 6d 20 70 75 72 |=======.|From pur|
|00000430| 2d 65 65 21 6a 2e 63 63 | 2e 70 75 72 64 75 65 2e |-ee!j.cc|.purdue.|
|00000440| 65 64 75 21 69 2e 63 63 | 2e 70 75 72 64 75 65 2e |edu!i.cc|.purdue.|
|00000450| 65 64 75 21 70 75 72 64 | 75 65 21 75 6d 64 35 21 |edu!purd|ue!umd5!|
|00000460| 62 72 6c 2d 61 64 6d 21 | 68 75 73 63 36 21 62 62 |brl-adm!|husc6!bb|
|00000470| 6e 21 62 62 6e 2e 63 6f | 6d 21 72 73 61 6c 7a 20 |n!bbn.co|m!rsalz |
|00000480| 54 68 75 20 46 65 62 20 | 31 38 20 31 35 3a 34 34 |Thu Feb |18 15:44|
|00000490| 3a 34 34 20 45 53 54 20 | 31 39 38 38 0a 0a 53 75 |:44 EST |1988..Su|
|000004a0| 62 6d 69 74 74 65 64 2d | 62 79 3a 20 52 6f 62 20 |bmitted-|by: Rob |
|000004b0| 4d 63 4d 61 68 6f 6e 20 | 3c 64 61 69 73 79 2e 77 |McMahon |<daisy.w|
|000004c0| 61 72 77 69 63 6b 2e 61 | 63 2e 75 6b 21 63 75 64 |arwick.a|c.uk!cud|
|000004d0| 63 76 3e 0a 50 6f 73 74 | 69 6e 67 2d 6e 75 6d 62 |cv>.Post|ing-numb|
|000004e0| 65 72 3a 20 56 6f 6c 75 | 6d 65 20 31 33 2c 20 49 |er: Volu|me 13, I|
|000004f0| 73 73 75 65 20 34 38 0a | 41 72 63 68 69 76 65 2d |ssue 48.|Archive-|
|00000500| 6e 61 6d 65 3a 20 77 69 | 74 68 0a 0a 57 69 74 68 |name: wi|th..With|
|00000510| 20 77 69 6c 6c 20 72 65 | 73 65 72 76 65 20 65 78 | will re|serve ex|
|00000520| 63 6c 75 73 69 76 65 20 | 75 73 65 20 6f 66 20 61 |clusive |use of a|
|00000530| 20 64 65 76 69 63 65 20 | 62 79 20 63 72 65 61 74 | device |by creat|
|00000540| 69 6e 67 20 61 20 6c 6f | 63 6b 20 66 69 6c 65 2c |ing a lo|ck file,|
|00000550| 0a 63 68 61 6e 67 69 6e | 67 20 6f 77 6e 65 72 73 |.changin|g owners|
|00000560| 68 69 70 20 6f 66 20 74 | 68 65 20 64 65 76 69 63 |hip of t|he devic|
|00000570| 65 20 74 6f 20 79 6f 75 | 72 20 63 75 72 72 65 6e |e to you|r curren|
|00000580| 74 20 75 73 65 72 20 69 | 64 2c 20 73 65 74 74 69 |t user i|d, setti|
|00000590| 6e 67 20 74 68 65 0a 64 | 65 76 69 63 65 20 74 6f |ng the.d|evice to|
|000005a0| 20 6d 6f 64 65 20 36 30 | 30 20 28 72 77 20 62 79 | mode 60|0 (rw by|
|000005b0| 20 79 6f 75 2c 20 6e 6f | 74 68 69 6e 67 20 74 6f | you, no|thing to|
|000005c0| 20 6f 74 68 65 72 73 29 | 2c 20 61 6e 64 20 67 69 | others)|, and gi|
|000005d0| 76 69 6e 67 20 79 6f 75 | 20 61 20 6e 65 77 0a 73 |ving you| a new.s|
|000005e0| 68 65 6c 6c 2e 20 20 57 | 68 65 6e 20 74 68 65 20 |hell. W|hen the |
|000005f0| 73 68 65 6c 6c 20 74 65 | 72 6d 69 6e 61 74 65 73 |shell te|rminates|
|00000600| 2c 20 74 68 65 20 64 65 | 76 69 63 65 20 69 73 20 |, the de|vice is |
|00000610| 72 65 6c 65 61 73 65 64 | 2e 20 20 49 6e 20 74 68 |released|. In th|
|00000620| 65 20 65 76 65 6e 74 0a | 74 68 61 74 20 61 20 64 |e event.|that a d|
|00000630| 65 76 69 63 65 20 69 73 | 20 69 6e 20 75 73 65 20 |evice is| in use |
|00000640| 62 79 20 61 6e 6f 74 68 | 65 72 20 75 73 65 72 20 |by anoth|er user |
|00000650| 79 6f 75 20 77 69 6c 6c | 20 62 65 20 6e 6f 74 69 |you will| be noti|
|00000660| 66 69 65 64 20 6f 66 20 | 74 68 69 73 2c 20 61 6e |fied of |this, an|
|00000670| 64 0a 77 69 74 68 20 63 | 61 6e 20 77 61 69 74 20 |d.with c|an wait |
|00000680| 75 6e 74 69 6c 20 69 74 | 20 69 73 20 61 76 61 69 |until it| is avai|
|00000690| 6c 61 62 6c 65 2e 0a 0a | 46 6f 72 20 65 78 61 6d |lable...|For exam|
|000006a0| 70 6c 65 3a 0a 09 77 69 | 74 68 20 2d 6e 20 74 61 |ple:..wi|th -n ta|
|000006b0| 70 65 20 22 52 6f 62 27 | 73 20 74 61 70 65 2c 20 |pe "Rob'|s tape, |
|000006c0| 74 6f 20 72 65 61 64 2c | 20 70 6c 65 61 73 65 22 |to read,| please"|
|000006d0| 0a 09 77 69 74 68 20 74 | 61 70 65 20 22 2e 2e 2e |..with t|ape "...|
|000006e0| 22 20 2d 63 20 22 74 61 | 72 20 78 76 70 20 3b 20 |" -c "ta|r xvp ; |
|000006f0| 6d 74 20 6f 66 66 6c 22 | 20 3e 20 74 61 72 2e 6f |mt offl"| > tar.o|
|00000700| 75 74 20 26 0a 2d 2d 2d | 2d 0a 00 00 00 00 00 00 |ut &.---|-.......|
|00000710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000720| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000790| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000800| 77 69 74 68 2f 4d 61 6b | 65 66 69 6c 65 00 00 00 |with/Mak|efile...|
|00000810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00000870| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00000880| 20 20 20 32 33 30 33 20 | 20 34 34 30 34 30 35 37 | 2303 | 4404057|
|00000890| 37 32 32 20 20 20 36 35 | 31 36 00 20 00 00 00 00 |722 65|16. ....|
|000008a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 23 20 6d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 77 |# makefi|le for w|
|00000a10| 69 74 68 0a 0a 23 20 44 | 45 53 54 44 49 52 20 69 |ith..# D|ESTDIR i|
|00000a20| 73 20 74 68 65 20 64 65 | 73 74 69 6e 61 74 69 6f |s the de|stinatio|
|00000a30| 6e 20 64 69 72 65 63 74 | 6f 72 79 20 28 69 6e 20 |n direct|ory (in |
|00000a40| 77 68 69 63 68 20 74 68 | 65 20 63 6f 6d 70 69 6c |which th|e compil|
|00000a50| 65 64 20 73 6f 75 72 63 | 65 20 6c 69 76 65 73 29 |ed sourc|e lives)|
|00000a60| 0a 23 20 43 46 4c 41 47 | 53 20 63 6f 6e 74 61 69 |.# CFLAG|S contai|
|00000a70| 6e 73 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 73 |ns the a|rguments|
|00000a80| 20 70 61 73 73 65 64 20 | 74 6f 20 74 68 65 20 43 | passed |to the C|
|00000a90| 20 63 6f 6d 70 69 6c 65 | 72 0a 23 20 53 45 50 49 | compile|r.# SEPI|
|00000aa0| 44 20 77 68 65 74 68 65 | 72 20 74 6f 20 62 65 20 |D whethe|r to be |
|00000ab0| 63 6f 6d 70 69 6c 65 64 | 20 77 69 74 68 20 2d 69 |compiled| with -i|
|00000ac0| 20 6f 72 20 2d 6e 20 28 | 6e 6f 74 20 75 73 65 64 | or -n (|not used|
|00000ad0| 20 6f 6e 20 74 68 65 20 | 56 41 58 29 0a 23 20 52 | on the |VAX).# R|
|00000ae0| 20 70 72 65 66 69 78 20 | 74 6f 20 64 65 73 74 69 | prefix |to desti|
|00000af0| 6e 61 74 69 6f 6e 20 6e | 61 6d 65 73 20 28 69 65 |nation n|ames (ie|
|00000b00| 2e 20 61 6e 20 6f 70 74 | 69 6f 6e 61 6c 20 72 6f |. an opt|ional ro|
|00000b10| 6f 74 29 0a 23 20 48 41 | 43 4b 53 20 2d 20 6c 6f |ot).# HA|CKS - lo|
|00000b20| 63 61 6c 20 66 6c 61 67 | 73 20 74 6f 20 74 68 65 |cal flag|s to the|
|00000b30| 20 43 20 63 6f 6d 70 69 | 6c 65 72 20 74 6f 20 64 | C compi|ler to d|
|00000b40| 65 66 69 6e 65 2f 75 6e | 64 65 66 69 6e 65 20 73 |efine/un|define s|
|00000b50| 79 6d 62 6f 6c 73 0a 0a | 44 45 53 54 44 49 52 3d |ymbols..|DESTDIR=|
|00000b60| 2f 75 73 72 2f 6c 6f 63 | 61 6c 0a 48 41 43 4b 53 |/usr/loc|al.HACKS|
|00000b70| 3d 0a 53 45 50 49 44 3d | 0a 43 46 4c 41 47 53 3d |=.SEPID=|.CFLAGS=|
|00000b80| 2d 4f 20 24 28 53 45 50 | 49 44 29 20 24 28 48 41 |-O $(SEP|ID) $(HA|
|00000b90| 43 4b 53 29 0a 52 3d 0a | 0a 2e 53 55 46 46 49 58 |CKS).R=.|..SUFFIX|
|00000ba0| 45 53 3a 09 2e 63 2c 76 | 0a 0a 61 6c 6c 20 77 69 |ES:..c,v|..all wi|
|00000bb0| 74 68 3a 20 77 69 74 68 | 2e 6f 0a 09 24 28 43 43 |th: with|.o..$(CC|
|00000bc0| 29 20 24 28 43 46 4c 41 | 47 53 29 20 77 69 74 68 |) $(CFLA|GS) with|
|00000bd0| 2e 6f 20 2d 6f 20 77 69 | 74 68 0a 0a 63 70 20 69 |.o -o wi|th..cp i|
|00000be0| 6e 73 74 61 6c 6c 3a 20 | 20 20 20 20 77 69 74 68 |nstall: | with|
|00000bf0| 0a 09 69 6e 73 74 61 6c | 6c 20 2d 73 20 2d 6f 20 |..instal|l -s -o |
|00000c00| 72 6f 6f 74 20 2d 67 20 | 67 65 6e 65 72 61 6c 20 |root -g |general |
|00000c10| 2d 6d 20 34 37 31 30 20 | 77 69 74 68 20 24 52 24 |-m 4710 |with $R$|
|00000c20| 28 44 45 53 54 44 49 52 | 29 0a 0a 63 6d 70 3a 20 |(DESTDIR|)..cmp: |
|00000c30| 20 20 20 77 69 74 68 0a | 09 2d 63 6d 70 20 77 69 | with.|.-cmp wi|
|00000c40| 74 68 20 24 52 24 28 44 | 45 53 54 44 49 52 29 2f |th $R$(D|ESTDIR)/|
|00000c50| 77 69 74 68 0a 09 72 6d | 20 2d 66 20 77 69 74 68 |with..rm| -f with|
|00000c60| 20 2a 2e 6f 0a 0a 63 6c | 65 61 6e 3a 0a 09 72 6d | *.o..cl|ean:..rm|
|00000c70| 20 2d 66 20 77 69 74 68 | 20 2a 2e 6f 0a 0a 2e 63 | -f with| *.o...c|
|00000c80| 2c 76 2e 6f 3a 0a 09 63 | 6f 20 2d 71 20 24 2a 2e |,v.o:..c|o -q $*.|
|00000c90| 63 0a 09 24 28 43 43 29 | 20 24 28 43 46 4c 41 47 |c..$(CC)| $(CFLAG|
|00000ca0| 53 29 20 2d 63 20 24 2a | 2e 63 0a 09 72 6d 20 2d |S) -c $*|.c..rm -|
|00000cb0| 66 20 24 2a 2e 63 0a 0a | 23 20 65 6e 74 72 79 20 |f $*.c..|# entry |
|00000cc0| 70 6f 69 6e 74 73 20 61 | 72 65 20 28 61 74 20 6c |points a|re (at l|
|00000cd0| 65 61 73 74 29 3a 0a 23 | 20 20 61 6c 6c 2c 20 77 |east):.#| all, w|
|00000ce0| 69 74 68 20 2d 20 63 6f | 6d 70 69 6c 65 20 77 69 |ith - co|mpile wi|
|00000cf0| 74 68 20 61 6e 64 20 6c | 65 61 76 65 20 69 74 20 |th and l|eave it |
|00000d00| 77 68 65 72 65 20 69 74 | 20 69 73 0a 23 20 20 63 |where it| is.# c|
|00000d10| 70 2c 20 69 6e 73 74 61 | 6c 6c 20 2d 20 63 6f 6d |p, insta|ll - com|
|00000d20| 70 69 6c 65 20 61 6e 64 | 20 69 6e 73 74 61 6c 6c |pile and| install|
|00000d30| 20 77 69 74 68 0a 23 20 | 20 63 6d 70 20 20 20 20 | with.# | cmp |
|00000d40| 20 20 20 20 20 2d 20 63 | 6f 6d 70 69 6c 65 20 61 | - c|ompile a|
|00000d50| 6e 64 20 63 6f 6d 70 61 | 72 65 20 77 69 74 68 2c |nd compa|re with,|
|00000d60| 20 72 65 6d 6f 76 65 20 | 64 72 6f 73 73 0a 23 20 | remove |dross.# |
|00000d70| 20 63 6c 65 61 6e 20 20 | 20 20 20 20 20 2d 20 72 | clean | - r|
|00000d80| 65 6d 6f 76 65 73 20 61 | 6e 79 20 67 61 72 62 61 |emoves a|ny garba|
|00000d90| 67 65 0a 23 20 64 65 66 | 61 75 6c 74 20 61 63 74 |ge.# def|ault act|
|00000da0| 69 6f 6e 20 69 73 20 74 | 6f 20 63 6f 6d 70 69 6c |ion is t|o compil|
|00000db0| 65 20 61 6e 64 20 6c 65 | 61 76 65 20 74 68 65 20 |e and le|ave the |
|00000dc0| 62 69 6e 61 72 79 20 69 | 6e 20 73 69 74 75 0a 0a |binary i|n situ..|
|00000dd0| 0a 23 20 74 68 65 72 65 | 20 61 72 65 20 70 72 6f |.# there| are pro|
|00000de0| 62 6c 65 6d 73 20 69 66 | 20 74 68 65 20 63 6f 6d |blems if| the com|
|00000df0| 6d 61 6e 64 20 6e 61 6d | 65 20 69 73 20 74 68 65 |mand nam|e is the|
|00000e00| 20 73 61 6d 65 20 61 73 | 20 61 6e 20 65 6e 74 72 | same as| an entr|
|00000e10| 79 20 70 6f 69 6e 74 2e | 0a 23 20 74 68 65 72 65 |y point.|.# there|
|00000e20| 20 61 72 65 20 70 72 6f | 62 6c 65 6d 73 20 6d 6f | are pro|blems mo|
|00000e30| 76 69 6e 67 20 6d 76 20 | 74 6f 20 2f 75 73 72 2f |ving mv |to /usr/|
|00000e40| 75 63 62 2f 6d 76 20 28 | 74 65 78 74 20 69 6e 20 |ucb/mv (|text in |
|00000e50| 75 73 65 29 0a 23 20 20 | 20 20 20 20 20 6f 72 20 |use).# | or |
|00000e60| 63 70 69 6e 67 20 63 70 | 20 74 6f 20 2f 62 69 6e |cping cp| to /bin|
|00000e70| 2f 63 70 0a 23 0a 23 20 | 63 6c 65 61 6e 20 64 6f |/cp.#.# |clean do|
|00000e80| 65 73 20 6e 6f 74 20 72 | 65 6d 6f 76 65 20 2e 63 |es not r|emove .c|
|00000e90| 20 66 69 6c 65 73 20 77 | 68 65 6e 20 74 68 65 20 | files w|hen the |
|00000ea0| 73 6f 75 72 63 65 20 69 | 73 20 69 6e 20 73 63 63 |source i|s in scc|
|00000eb0| 73 20 73 2e 20 2e 2e 2e | 20 2e 63 20 66 6f 72 6d |s s. ...| .c form|
|00000ec0| 61 74 0a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |at......|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001000| 77 69 74 68 2f 52 45 41 | 44 4d 45 00 00 00 00 00 |with/REA|DME.....|
|00001010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001070| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001080| 20 20 20 33 36 31 31 20 | 20 34 34 30 34 30 35 37 | 3611 | 4404057|
|00001090| 37 32 34 20 20 20 35 37 | 34 33 00 20 00 00 00 00 |724 57|43. ....|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000011f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001200| 57 69 74 68 20 69 73 20 | 62 61 73 65 64 20 6f 6e |With is |based on|
|00001210| 20 61 20 73 65 74 20 6f | 66 20 70 72 6f 67 72 61 | a set o|f progra|
|00001220| 6d 73 2c 20 77 72 69 74 | 74 65 6e 20 62 79 20 44 |ms, writ|ten by D|
|00001230| 61 76 65 20 42 75 74 74 | 65 72 66 69 65 6c 64 20 |ave Butt|erfield |
|00001240| 61 74 20 74 68 65 0a 55 | 43 4c 41 20 44 65 70 74 |at the.U|CLA Dept|
|00001250| 2e 20 6f 66 20 4d 61 74 | 68 61 6d 61 74 69 63 73 |. of Mat|hamatics|
|00001260| 2c 20 63 61 6c 6c 65 64 | 20 67 65 74 20 26 20 72 |, called| get & r|
|00001270| 6c 73 2e 20 20 54 68 65 | 73 65 20 70 72 6f 67 72 |ls. The|se progr|
|00001280| 61 6d 73 20 68 61 64 20 | 61 0a 6e 75 6d 62 65 72 |ams had |a.number|
|00001290| 20 6f 66 20 70 72 6f 62 | 6c 65 6d 73 20 69 6e 20 | of prob|lems in |
|000012a0| 6f 75 72 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 2c |our envi|ronment,|
|000012b0| 20 74 68 65 20 77 6f 72 | 73 74 20 62 65 69 6e 67 | the wor|st being|
|000012c0| 20 74 68 61 74 20 79 6f | 75 20 63 6f 75 6c 64 6e | that yo|u couldn|
|000012d0| 27 74 0a 75 73 65 20 74 | 68 65 6d 20 74 6f 20 72 |'t.use t|hem to r|
|000012e0| 75 6e 20 61 20 6a 6f 62 | 20 69 6e 20 74 68 65 20 |un a job| in the |
|000012f0| 62 61 63 6b 67 72 6f 75 | 6e 64 2e 20 20 4f 75 74 |backgrou|nd. Out|
|00001300| 20 6f 66 20 74 68 69 73 | 20 67 72 65 77 20 77 69 | of this| grew wi|
|00001310| 74 68 2e 0a 0a 57 69 74 | 68 20 75 73 65 73 20 61 |th...Wit|h uses a|
|00001320| 20 6c 6f 63 6b 66 69 6c | 65 20 28 4c 4f 43 4b 53 | lockfil|e (LOCKS|
|00001330| 46 49 4c 45 2c 20 22 2f | 65 74 63 2f 6c 6f 63 6b |FILE, "/|etc/lock|
|00001340| 73 2f 6c 6f 63 6b 66 69 | 6c 65 73 22 20 62 79 20 |s/lockfi|les" by |
|00001350| 64 65 66 61 75 6c 74 29 | 2c 0a 77 69 74 68 20 6c |default)|,.with l|
|00001360| 69 6e 65 73 20 63 6f 6e | 73 69 73 74 69 6e 67 20 |ines con|sisting |
|00001370| 6f 66 3a 20 6e 61 6d 65 | 20 6f 66 20 66 69 6c 65 |of: name| of file|
|00001380| 20 74 6f 20 63 72 65 61 | 74 65 20 61 6e 64 20 66 | to crea|te and f|
|00001390| 6c 6f 63 6b 2c 20 6e 61 | 6d 65 20 6f 66 0a 72 65 |lock, na|me of.re|
|000013a0| 73 6f 75 72 63 65 73 20 | 61 73 20 6b 6e 6f 77 6e |sources |as known|
|000013b0| 20 74 6f 20 75 73 65 72 | 2c 20 61 6e 64 20 61 20 | to user|, and a |
|000013c0| 6c 69 73 74 20 6f 66 20 | 75 70 20 74 6f 20 4d 41 |list of |up to MA|
|000013d0| 58 50 44 45 56 20 28 31 | 36 29 20 64 65 76 69 63 |XPDEV (1|6) devic|
|000013e0| 65 73 0a 77 68 69 63 68 | 20 61 72 65 20 63 68 6f |es.which| are cho|
|000013f0| 77 6e 27 65 64 20 74 6f | 20 74 68 65 20 75 73 65 |wn'ed to| the use|
|00001400| 72 2c 20 61 6e 64 20 67 | 69 76 65 6e 20 6d 6f 64 |r, and g|iven mod|
|00001410| 65 20 4f 57 4e 45 52 4f | 4e 4c 59 20 28 30 36 30 |e OWNERO|NLY (060|
|00001420| 30 2c 0a 2d 72 77 2d 2d | 2d 2d 2d 2d 2d 29 2c 20 |0,.-rw--|-----), |
|00001430| 62 65 66 6f 72 65 20 61 | 20 73 75 62 73 68 65 6c |before a| subshel|
|00001440| 6c 20 69 73 20 73 74 61 | 72 74 65 64 2e 20 20 57 |l is sta|rted. W|
|00001450| 68 65 6e 20 74 68 65 20 | 73 68 65 6c 6c 20 65 78 |hen the |shell ex|
|00001460| 69 74 73 2c 20 74 68 65 | 0a 64 65 76 69 63 65 73 |its, the|.devices|
|00001470| 20 61 72 65 20 63 68 6f | 77 6e 27 65 64 20 62 61 | are cho|wn'ed ba|
|00001480| 63 6b 20 74 6f 20 52 6f | 6f 74 75 69 64 2c 20 52 |ck to Ro|otuid, R|
|00001490| 6f 6f 74 67 69 64 20 28 | 30 2c 33 29 2c 20 61 6e |ootgid (|0,3), an|
|000014a0| 64 20 74 68 65 20 66 6c | 6f 63 6b 20 69 73 0a 72 |d the fl|ock is.r|
|000014b0| 65 6d 6f 76 65 64 20 62 | 79 20 77 69 74 68 20 65 |emoved b|y with e|
|000014c0| 78 69 74 69 6e 67 2e 20 | 20 28 54 68 65 20 6c 6f |xiting. | (The lo|
|000014d0| 63 6b 66 69 6c 65 20 69 | 73 20 6e 6f 74 20 72 65 |ckfile i|s not re|
|000014e0| 6d 6f 76 65 64 2c 20 61 | 73 20 73 6f 6d 65 6f 6e |moved, a|s someon|
|000014f0| 65 20 65 6c 73 65 0a 63 | 6f 75 6c 64 20 68 61 76 |e else.c|ould hav|
|00001500| 65 20 61 6e 20 66 6c 6f | 63 6b 20 70 65 6e 64 69 |e an flo|ck pendi|
|00001510| 6e 67 20 6f 6e 20 69 74 | 2e 29 0a 0a 41 20 73 65 |ng on it|.)..A se|
|00001520| 63 6f 6e 64 20 61 72 67 | 75 6d 65 6e 74 20 63 61 |cond arg|ument ca|
|00001530| 6e 20 62 65 20 67 69 76 | 65 6e 20 74 6f 20 77 69 |n be giv|en to wi|
|00001540| 74 68 2c 20 61 6e 64 20 | 69 66 20 69 74 20 69 73 |th, and |if it is|
|00001550| 20 6e 6f 74 20 61 6e 20 | 65 6d 70 74 79 20 73 74 | not an |empty st|
|00001560| 72 69 6e 67 0a 69 74 20 | 69 73 20 61 20 72 65 71 |ring.it |is a req|
|00001570| 75 65 73 74 20 77 68 69 | 63 68 20 69 73 20 73 65 |uest whi|ch is se|
|00001580| 6e 74 20 74 6f 20 74 68 | 65 20 6f 70 65 72 61 74 |nt to th|e operat|
|00001590| 6f 72 73 20 76 69 61 20 | 73 79 73 6c 6f 67 2c 20 |ors via |syslog, |
|000015a0| 61 6e 64 20 77 69 74 68 | 20 74 68 65 6e 0a 77 61 |and with| then.wa|
|000015b0| 69 74 73 20 66 6f 72 20 | 61 20 73 69 67 6e 61 6c |its for |a signal|
|000015c0| 20 62 61 63 6b 20 66 72 | 6f 6d 20 74 68 65 20 6f | back fr|om the o|
|000015d0| 70 65 72 61 74 6f 72 73 | 20 74 6f 20 73 61 79 20 |perators| to say |
|000015e0| 77 68 65 74 68 65 72 20 | 74 68 65 20 72 65 71 75 |whether |the requ|
|000015f0| 65 73 74 0a 68 61 73 20 | 62 65 65 6e 20 66 75 6c |est.has |been ful|
|00001600| 66 69 6c 6c 65 64 20 6f | 72 20 64 65 6e 69 65 64 |filled o|r denied|
|00001610| 20 28 53 49 47 45 4d 54 | 20 6f 72 20 53 49 47 54 | (SIGEMT| or SIGT|
|00001620| 45 52 4d 29 2e 20 20 41 | 6e 79 20 65 78 74 72 61 |ERM). A|ny extra|
|00001630| 20 61 72 67 75 6d 65 6e | 74 73 0a 61 72 65 20 70 | argumen|ts.are p|
|00001640| 61 73 73 65 64 20 74 6f | 20 74 68 65 20 73 75 62 |assed to| the sub|
|00001650| 73 68 65 6c 6c 2e 0a 0a | 41 20 70 73 65 75 64 6f |shell...|A pseudo|
|00001660| 2d 72 65 73 6f 75 72 63 | 65 20 27 2d 27 20 69 73 |-resourc|e '-' is|
|00001670| 20 61 76 61 69 6c 61 62 | 6c 65 2c 20 77 68 69 63 | availab|le, whic|
|00001680| 68 20 61 6c 6c 6f 77 73 | 20 61 20 72 65 71 75 65 |h allows| a reque|
|00001690| 73 74 20 74 6f 20 74 68 | 65 0a 6f 70 65 72 61 74 |st to th|e.operat|
|000016a0| 6f 72 73 20 77 69 74 68 | 6f 75 74 20 61 63 74 75 |ors with|out actu|
|000016b0| 61 6c 6c 79 20 67 65 74 | 74 69 6e 67 20 61 6e 79 |ally get|ting any|
|000016c0| 20 72 65 73 6f 75 72 63 | 65 2e 20 20 54 68 69 73 | resourc|e. This|
|000016d0| 20 69 73 20 75 73 65 66 | 75 6c 20 66 6f 72 0a 65 | is usef|ul for.e|
|000016e0| 2e 67 2e 20 6c 6f 61 64 | 69 6e 67 20 74 68 65 20 |.g. load|ing the |
|000016f0| 73 65 63 6f 6e 64 20 74 | 61 70 65 2e 0a 0a 65 2e |second t|ape...e.|
|00001700| 67 2e 0a 0a 77 69 74 68 | 20 2d 6e 20 74 61 70 65 |g...with| -n tape|
|00001710| 20 22 52 6f 62 27 73 20 | 74 61 70 65 2c 20 74 6f | "Rob's |tape, to|
|00001720| 20 72 65 61 64 2c 20 70 | 6c 65 61 73 65 22 0a 2e | read, p|lease"..|
|00001730| 2e 2e 0a 6d 74 20 6f 66 | 66 6c 0a 77 69 74 68 20 |...mt of|fl.with |
|00001740| 2d 20 22 73 65 63 6f 6e | 64 20 74 61 70 65 2c 20 |- "secon|d tape, |
|00001750| 70 6c 65 61 73 65 22 0a | 2e 2e 2e 0a 6d 74 20 6f |please".|....mt o|
|00001760| 66 66 6c 0a 5e 44 0a 0a | 54 68 65 20 2d 6e 20 74 |ffl.^D..|The -n t|
|00001770| 65 6c 6c 73 20 77 69 74 | 68 20 6e 6f 74 20 74 6f |ells wit|h not to|
|00001780| 20 77 61 69 74 20 69 66 | 20 73 6f 6d 65 6f 6e 65 | wait if| someone|
|00001790| 20 65 6c 73 65 20 69 73 | 20 61 6c 72 65 61 64 79 | else is| already|
|000017a0| 20 75 73 69 6e 67 20 74 | 68 65 20 74 61 70 65 0a | using t|he tape.|
|000017b0| 64 65 63 6b 2e 20 20 57 | 65 20 72 65 63 6f 6d 6d |deck. W|e recomm|
|000017c0| 65 6e 64 20 74 68 65 20 | 27 6d 74 20 6f 66 66 6c |end the |'mt offl|
|000017d0| 27 73 20 73 6f 20 74 68 | 61 74 20 79 6f 75 72 20 |'s so th|at your |
|000017e0| 74 61 70 65 20 69 73 20 | 75 6e 61 76 61 69 6c 61 |tape is |unavaila|
|000017f0| 62 6c 65 20 74 6f 0a 61 | 6e 79 6f 6e 65 20 65 6c |ble to.a|nyone el|
|00001800| 73 65 20 75 73 69 6e 67 | 20 77 69 74 68 20 61 66 |se using| with af|
|00001810| 74 65 72 20 79 6f 75 20 | 72 65 6c 65 61 73 65 20 |ter you |release |
|00001820| 74 68 65 20 74 61 70 65 | 20 64 65 63 6b 2e 0a 0a |the tape| deck...|
|00001830| 49 6e 20 61 6e 20 27 61 | 74 27 20 6a 6f 62 3a 0a |In an 'a|t' job:.|
|00001840| 0a 77 69 74 68 20 74 61 | 70 65 20 22 2e 2e 2e 22 |.with ta|pe "..."|
|00001850| 20 3c 3c 20 45 4f 46 0a | 2e 2e 2e 0a 6d 74 20 6f | << EOF.|....mt o|
|00001860| 66 66 6c 0a 45 4f 46 0a | 0a 49 6e 20 74 68 65 20 |ffl.EOF.|.In the |
|00001870| 62 61 63 6b 67 72 6f 75 | 6e 64 3a 0a 0a 77 69 74 |backgrou|nd:..wit|
|00001880| 68 20 74 61 70 65 20 22 | 2e 2e 2e 22 20 2d 63 20 |h tape "|..." -c |
|00001890| 22 74 61 72 20 78 76 70 | 20 3b 20 6d 74 20 6f 66 |"tar xvp| ; mt of|
|000018a0| 66 6c 22 20 3e 20 74 61 | 72 2e 6f 75 74 20 26 0a |fl" > ta|r.out &.|
|000018b0| 0a 2d 2d 2d 0a 55 55 43 | 50 3a 20 20 20 2e 2e 2e |.---.UUC|P: ...|
|000018c0| 21 6d 63 76 61 78 21 75 | 6b 63 21 77 61 72 77 69 |!mcvax!u|kc!warwi|
|000018d0| 63 6b 21 63 75 64 63 76 | 09 50 48 4f 4e 45 3a 20 |ck!cudcv|.PHONE: |
|000018e0| 20 2b 34 34 20 32 30 33 | 20 35 32 33 30 33 37 0a | +44 203| 523037.|
|000018f0| 4a 41 4e 45 54 3a 20 20 | 63 75 64 63 76 40 75 6b |JANET: |cudcv@uk|
|00001900| 2e 61 63 2e 77 61 72 77 | 69 63 6b 2e 64 61 69 73 |.ac.warw|ick.dais|
|00001910| 79 20 20 20 20 20 20 20 | 41 52 50 41 3a 20 20 20 |y |ARPA: |
|00001920| 63 75 64 63 76 40 64 61 | 69 73 79 2e 77 61 72 77 |cudcv@da|isy.warw|
|00001930| 69 63 6b 2e 61 63 2e 75 | 6b 0a 52 6f 62 20 4d 63 |ick.ac.u|k.Rob Mc|
|00001940| 4d 61 68 6f 6e 2c 20 43 | 6f 6d 70 75 74 69 6e 67 |Mahon, C|omputing|
|00001950| 20 53 65 72 76 69 63 65 | 73 2c 20 57 61 72 77 69 | Service|s, Warwi|
|00001960| 63 6b 20 55 6e 69 76 65 | 72 73 69 74 79 2c 20 43 |ck Unive|rsity, C|
|00001970| 6f 76 65 6e 74 72 79 20 | 43 56 34 20 37 41 4c 2c |oventry |CV4 7AL,|
|00001980| 20 45 6e 67 6c 61 6e 64 | 0a 00 00 00 00 00 00 00 | England|........|
|00001990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a00| 77 69 74 68 2f 77 69 74 | 68 2e 31 00 00 00 00 00 |with/wit|h.1.....|
|00001a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00001a70| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00001a80| 20 20 20 33 34 33 34 20 | 20 34 34 30 34 30 35 37 | 3434 | 4404057|
|00001a90| 37 32 35 20 20 20 36 31 | 32 34 00 20 00 00 00 00 |725 61|24. ....|
|00001aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001c00| 2e 54 48 20 77 69 74 68 | 20 31 20 6c 6f 63 61 6c |.TH with| 1 local|
|00001c10| 0a 2e 53 48 20 4e 41 4d | 45 0a 77 69 74 68 20 5c |..SH NAM|E.with \|
|00001c20| 2d 20 61 20 70 72 6f 67 | 72 61 6d 20 74 6f 20 72 |- a prog|ram to r|
|00001c30| 65 73 65 72 76 65 20 65 | 78 63 6c 75 73 69 76 65 |eserve e|xclusive|
|00001c40| 20 75 73 65 20 6f 66 20 | 61 20 64 65 76 69 63 65 | use of |a device|
|00001c50| 0a 2e 53 48 20 53 59 4e | 4f 50 53 49 53 0a 2e 49 |..SH SYN|OPSIS..I|
|00001c60| 0a 2e 42 20 77 69 74 68 | 0a 5b 0a 2e 42 20 5c 2d |..B with|.[..B \-|
|00001c70| 73 6e 0a 5d 0a 2e 49 20 | 64 65 76 0a 5b 0a 2e 49 |sn.]..I |dev.[..I|
|00001c80| 20 72 65 71 75 65 73 74 | 0a 5b 0a 2e 49 20 73 68 | request|.[..I sh|
|00001c90| 65 6c 6c 20 70 61 72 61 | 6d 65 74 65 72 73 0a 5d |ell para|meters.]|
|00001ca0| 0a 5d 0a 2e 53 48 20 44 | 45 53 43 52 49 50 54 49 |.]..SH D|ESCRIPTI|
|00001cb0| 4f 4e 0a 2e 49 20 57 69 | 74 68 0a 77 69 6c 6c 20 |ON..I Wi|th.will |
|00001cc0| 72 65 73 65 72 76 65 20 | 65 78 63 6c 75 73 69 76 |reserve |exclusiv|
|00001cd0| 65 20 75 73 65 20 6f 66 | 20 61 20 64 65 76 69 63 |e use of| a devic|
|00001ce0| 65 20 62 79 20 63 72 65 | 61 74 69 6e 67 20 61 20 |e by cre|ating a |
|00001cf0| 6c 6f 63 6b 20 66 69 6c | 65 2c 20 63 68 61 6e 67 |lock fil|e, chang|
|00001d00| 69 6e 67 0a 6f 77 6e 65 | 72 73 68 69 70 20 6f 66 |ing.owne|rship of|
|00001d10| 20 74 68 65 20 64 65 76 | 69 63 65 20 74 6f 20 79 | the dev|ice to y|
|00001d20| 6f 75 72 20 63 75 72 72 | 65 6e 74 20 75 73 65 72 |our curr|ent user|
|00001d30| 20 69 64 2c 20 73 65 74 | 74 69 6e 67 20 74 68 65 | id, set|ting the|
|00001d40| 20 64 65 76 69 63 65 20 | 74 6f 0a 6d 6f 64 65 20 | device |to.mode |
|00001d50| 36 30 30 20 28 72 77 20 | 62 79 20 79 6f 75 2c 20 |600 (rw |by you, |
|00001d60| 6e 6f 74 68 69 6e 67 20 | 74 6f 20 6f 74 68 65 72 |nothing |to other|
|00001d70| 73 29 2c 20 61 6e 64 20 | 67 69 76 69 6e 67 20 79 |s), and |giving y|
|00001d80| 6f 75 20 61 20 6e 65 77 | 20 73 68 65 6c 6c 2e 20 |ou a new| shell. |
|00001d90| 20 57 68 65 6e 20 74 68 | 65 0a 73 68 65 6c 6c 20 | When th|e.shell |
|00001da0| 74 65 72 6d 69 6e 61 74 | 65 73 2c 20 74 68 65 20 |terminat|es, the |
|00001db0| 64 65 76 69 63 65 20 69 | 73 20 72 65 6c 65 61 73 |device i|s releas|
|00001dc0| 65 64 2e 0a 49 6e 20 74 | 68 65 20 65 76 65 6e 74 |ed..In t|he event|
|00001dd0| 20 74 68 61 74 20 61 20 | 64 65 76 69 63 65 20 69 | that a |device i|
|00001de0| 73 20 69 6e 0a 75 73 65 | 20 62 79 20 61 6e 6f 74 |s in.use| by anot|
|00001df0| 68 65 72 20 75 73 65 72 | 20 79 6f 75 20 77 69 6c |her user| you wil|
|00001e00| 6c 20 62 65 20 6e 6f 74 | 69 66 69 65 64 20 6f 66 |l be not|ified of|
|00001e10| 20 74 68 69 73 2c 20 61 | 6e 64 0a 2e 49 20 77 69 | this, a|nd..I wi|
|00001e20| 74 68 0a 77 69 6c 6c 20 | 77 61 69 74 20 75 6e 74 |th.will |wait unt|
|00001e30| 69 6c 20 69 74 20 69 73 | 20 61 76 61 69 6c 61 62 |il it is| availab|
|00001e40| 6c 65 2c 20 6f 72 20 69 | 66 20 74 68 65 0a 2e 42 |le, or i|f the..B|
|00001e50| 20 5c 2d 6e 0a 66 6c 61 | 67 20 69 73 20 67 69 76 | \-n.fla|g is giv|
|00001e60| 65 6e 20 77 69 6c 6c 20 | 72 65 74 75 72 6e 20 69 |en will |return i|
|00001e70| 6d 6d 65 64 69 61 74 65 | 6c 79 20 77 69 74 68 20 |mmediate|ly with |
|00001e80| 61 6e 20 69 6e 64 69 63 | 61 74 69 6f 6e 20 6f 66 |an indic|ation of|
|00001e90| 20 66 61 69 6c 75 72 65 | 2e 0a 54 68 65 0a 2e 42 | failure|..The..B|
|00001ea0| 20 5c 2d 73 0a 73 77 69 | 74 63 68 20 63 61 75 73 | \-s.swi|tch caus|
|00001eb0| 65 73 0a 2e 49 20 77 69 | 74 68 0a 74 6f 20 70 65 |es..I wi|th.to pe|
|00001ec0| 72 66 6f 72 6d 20 69 74 | 73 20 77 6f 72 6b 20 73 |rform it|s work s|
|00001ed0| 69 6c 65 6e 74 6c 79 2e | 0a 2e 49 20 57 69 74 68 |ilently.|..I With|
|00001ee0| 0a 72 65 74 75 72 6e 73 | 20 61 20 6e 6f 6e 7a 65 |.returns| a nonze|
|00001ef0| 72 6f 20 72 65 74 75 72 | 6e 20 63 6f 64 65 20 74 |ro retur|n code t|
|00001f00| 6f 20 69 6e 64 69 63 61 | 74 65 20 66 61 69 6c 75 |o indica|te failu|
|00001f10| 72 65 2e 0a 2e 50 50 0a | 49 66 20 61 20 72 65 71 |re...PP.|If a req|
|00001f20| 75 65 73 74 20 69 73 20 | 73 70 65 63 69 66 69 65 |uest is |specifie|
|00001f30| 64 2c 20 74 68 65 20 6f | 70 65 72 61 74 6f 72 73 |d, the o|perators|
|00001f40| 20 61 72 65 20 61 73 6b | 65 64 20 74 6f 20 66 75 | are ask|ed to fu|
|00001f50| 6c 66 69 6c 20 74 68 65 | 20 72 65 71 75 65 73 74 |lfil the| request|
|00001f60| 20 6f 6e 63 65 0a 74 68 | 65 20 64 65 76 69 63 65 | once.th|e device|
|00001f70| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 2e 20 20 | is avai|lable. |
|00001f80| 45 2e 67 2e 0a 2e 50 50 | 0a 77 69 74 68 20 74 61 |E.g...PP|.with ta|
|00001f90| 70 65 20 22 63 75 64 63 | 76 27 73 20 74 61 70 65 |pe "cudc|v's tape|
|00001fa0| 20 74 6f 20 72 65 61 64 | 2c 20 70 6c 65 61 73 65 | to read|, please|
|00001fb0| 22 0a 2e 50 50 0a 41 20 | 72 65 71 75 65 73 74 20 |"..PP.A |request |
|00001fc0| 63 61 6e 20 62 65 20 6d | 61 64 65 20 77 69 74 68 |can be m|ade with|
|00001fd0| 6f 75 74 20 61 63 74 75 | 61 6c 6c 79 20 6c 6f 63 |out actu|ally loc|
|00001fe0| 6b 69 6e 67 20 61 20 64 | 65 76 69 63 65 20 62 79 |king a d|evice by|
|00001ff0| 20 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 0a | specify|ing the.|
|00002000| 64 65 76 69 63 65 20 61 | 73 20 60 2d 27 2e 20 20 |device a|s `-'. |
|00002010| 49 6e 20 74 68 69 73 20 | 63 61 73 65 20 6e 6f 20 |In this |case no |
|00002020| 73 68 65 6c 6c 20 69 73 | 20 73 74 61 72 74 65 64 |shell is| started|
|00002030| 2c 20 62 75 74 20 77 69 | 74 68 20 77 61 69 74 73 |, but wi|th waits|
|00002040| 20 75 6e 74 69 6c 20 74 | 68 65 0a 72 65 71 75 65 | until t|he.reque|
|00002050| 73 74 20 69 73 20 66 75 | 6c 66 69 6c 6c 65 64 2c |st is fu|lfilled,|
|00002060| 20 61 6e 64 20 74 68 65 | 6e 20 65 78 69 74 73 2e | and the|n exits.|
|00002070| 0a 2e 50 50 0a 41 72 67 | 75 6d 65 6e 74 73 20 61 |..PP.Arg|uments a|
|00002080| 66 74 65 72 20 74 68 65 | 0a 2e 49 20 72 65 71 75 |fter the|..I requ|
|00002090| 65 73 74 0a 61 72 65 20 | 68 61 6e 64 65 64 20 74 |est.are |handed t|
|000020a0| 6f 20 74 68 65 20 73 68 | 65 6c 6c 2e 20 20 41 20 |o the sh|ell. A |
|000020b0| 6e 75 6c 6c 20 72 65 71 | 75 65 73 74 20 63 61 6e |null req|uest can|
|000020c0| 20 62 65 20 73 70 65 63 | 69 66 69 65 64 20 61 73 | be spec|ified as|
|000020d0| 20 60 2d 27 2c 20 74 6f | 20 67 72 61 62 20 61 0a | `-', to| grab a.|
|000020e0| 64 65 76 69 63 65 20 61 | 6e 64 20 65 78 65 63 75 |device a|nd execu|
|000020f0| 74 65 20 61 20 63 6f 6d | 6d 61 6e 64 20 77 69 74 |te a com|mand wit|
|00002100| 68 6f 75 74 20 6d 61 6b | 69 6e 67 20 61 20 72 65 |hout mak|ing a re|
|00002110| 71 75 65 73 74 2e 0a 2e | 50 50 0a 43 75 72 72 65 |quest...|PP.Curre|
|00002120| 6e 74 6c 79 20 6b 6e 6f | 77 6e 20 64 65 76 69 63 |ntly kno|wn devic|
|00002130| 65 73 20 61 72 65 3a 0a | 2e 54 50 20 38 0a 74 61 |es are:.|.TP 8.ta|
|00002140| 70 65 0a 54 68 65 20 6d | 61 67 74 61 70 65 3b 20 |pe.The m|agtape; |
|00002150| 61 6c 6c 20 31 36 20 6c | 6f 67 69 63 61 6c 20 64 |all 16 l|ogical d|
|00002160| 65 76 69 63 65 73 20 38 | 30 30 20 26 20 31 36 30 |evices 8|00 & 160|
|00002170| 30 20 42 50 49 3a 20 28 | 7b 2c 6e 7d 7b 2c 72 7d |0 BPI: (|{,n}{,r}|
|00002180| 6d 74 7b 30 2c 34 2c 38 | 2c 31 32 7d 29 2e 0a 2e |mt{0,4,8|,12})...|
|00002190| 53 48 20 46 49 4c 45 53 | 0a 2e 54 50 20 33 30 0a |SH FILES|..TP 30.|
|000021a0| 2f 65 74 63 2f 6c 6f 63 | 6b 73 2f 6c 6f 63 6b 66 |/etc/loc|ks/lockf|
|000021b0| 69 6c 65 73 0a 66 6f 72 | 20 64 65 76 69 63 65 20 |iles.for| device |
|000021c0| 6e 61 6d 65 73 2c 20 6c | 6f 63 6b 20 66 69 6c 65 |names, l|ock file|
|000021d0| 20 6e 61 6d 65 73 2c 20 | 61 6e 64 20 2f 64 65 76 | names, |and /dev|
|000021e0| 2f 6d 69 6e 6f 72 64 65 | 76 20 6e 61 6d 65 73 2e |/minorde|v names.|
|000021f0| 0a 2e 53 48 20 45 4e 56 | 49 52 4f 4e 4d 45 4e 54 |..SH ENV|IRONMENT|
|00002200| 0a 2e 54 50 20 32 30 0a | 53 48 45 4c 4c 0a 66 6f |..TP 20.|SHELL.fo|
|00002210| 72 20 75 73 65 72 27 73 | 20 64 65 66 61 75 6c 74 |r user's| default|
|00002220| 20 73 68 65 6c 6c 0a 2e | 53 48 20 44 49 41 47 4e | shell..|SH DIAGN|
|00002230| 4f 53 54 49 43 53 0a 41 | 20 6e 6f 6e 2d 7a 65 72 |OSTICS.A| non-zer|
|00002240| 6f 20 72 65 74 75 72 6e | 20 63 6f 64 65 20 69 6e |o return| code in|
|00002250| 64 69 63 61 74 65 73 20 | 6f 6e 65 20 6f 66 20 74 |dicates |one of t|
|00002260| 68 65 20 64 65 76 69 63 | 65 73 20 77 61 73 20 6e |he devic|es was n|
|00002270| 6f 74 20 61 76 61 69 6c | 61 62 6c 65 2c 20 6f 72 |ot avail|able, or|
|00002280| 20 77 69 74 68 0a 77 61 | 73 20 69 6e 74 65 72 72 | with.wa|s interr|
|00002290| 75 70 74 65 64 2e 0a 2e | 6e 66 0a 64 65 76 20 69 |upted...|nf.dev i|
|000022a0| 73 20 79 6f 75 72 73 2e | 0a 64 65 76 20 69 73 20 |s yours.|.dev is |
|000022b0| 69 6e 20 75 73 65 20 2e | 2e 2e 20 77 61 69 74 69 |in use .|.. waiti|
|000022c0| 6e 67 0a 64 65 76 20 69 | 73 20 69 6e 20 75 73 65 |ng.dev i|s in use|
|000022d0| 20 2d 20 74 72 79 20 61 | 67 61 69 6e 20 6c 61 74 | - try a|gain lat|
|000022e0| 65 72 2e 0a 64 65 76 20 | 72 65 6c 65 61 73 65 64 |er..dev |released|
|000022f0| 2e 0a 49 20 64 6f 6e 27 | 74 20 6b 6e 6f 77 20 68 |..I don'|t know h|
|00002300| 6f 77 20 74 6f 20 67 65 | 74 20 64 65 76 2e 0a 2e |ow to ge|t dev...|
|00002310| 66 69 0a 2e 53 48 20 42 | 55 47 53 0a 20 72 65 71 |fi..SH B|UGS. req|
|00002320| 75 65 73 74 20 69 73 20 | 73 70 65 63 69 66 69 65 |uest is |specifie|
|00002330| 64 2c 20 74 68 65 20 6f | 70 65 72 61 74 6f 72 73 |d, the o|perators|
|00002340| 20 61 72 65 20 61 73 6b | 65 64 20 74 6f 20 66 75 | are ask|ed to fu|
|00002350| 6c 66 69 6c 20 74 68 65 | 20 72 65 71 75 65 73 74 |lfil the| request|
|00002360| 20 6f 6e 63 65 0a 74 68 | 65 20 64 65 76 69 63 65 | once.th|e device|
|00002370| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 2e 20 20 | is avai|lable. |
|00002380| 45 2e 67 2e 0a 2e 50 50 | 0a 77 69 74 68 20 74 61 |E.g...PP|.with ta|
|00002390| 70 65 20 22 63 75 64 63 | 76 27 73 20 74 61 70 65 |pe "cudc|v's tape|
|000023a0| 20 74 6f 20 72 65 61 64 | 2c 20 70 6c 65 61 73 65 | to read|, please|
|000023b0| 22 0a 2e 50 50 0a 41 20 | 72 65 71 75 65 73 74 20 |"..PP.A |request |
|000023c0| 63 61 6e 20 62 65 20 6d | 61 64 65 20 77 69 74 68 |can be m|ade with|
|000023d0| 6f 75 74 20 61 63 74 75 | 61 6c 6c 79 20 6c 6f 63 |out actu|ally loc|
|000023e0| 6b 69 6e 67 20 61 20 64 | 65 76 69 63 65 20 62 79 |king a d|evice by|
|000023f0| 20 73 70 65 63 69 66 79 | 69 6e 67 20 74 68 65 0a | specify|ing the.|
|00002400| 77 69 74 68 2f 77 69 74 | 68 2e 63 00 00 00 00 00 |with/wit|h.c.....|
|00002410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002460| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 32 |.... 6|44 . 2|
|00002470| 34 33 20 00 20 20 20 20 | 31 32 20 00 20 20 20 20 |43 . |12 . |
|00002480| 20 20 33 32 32 32 31 20 | 20 34 34 30 34 30 35 37 | 32221 | 4404057|
|00002490| 37 33 32 20 20 20 36 32 | 32 30 00 20 00 00 00 00 |732 62|20. ....|
|000024a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000024f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002500| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002580| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000025f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002600| 2f 2a 0a 20 2a 20 20 20 | 20 20 20 77 69 74 68 20 |/*. * | with |
|00002610| 2d 2d 2d 20 61 20 70 72 | 6f 67 72 61 6d 20 74 6f |--- a pr|ogram to|
|00002620| 20 64 6f 20 73 69 6d 70 | 6c 65 20 64 65 76 69 63 | do simp|le devic|
|00002630| 65 20 6c 6f 63 6b 69 6e | 67 2e 0a 20 2a 2f 0a 2f |e lockin|g.. */./|
|00002640| 2a 0a 20 2a 20 66 6f 72 | 6d 61 74 20 6f 66 20 77 |*. * for|mat of w|
|00002650| 6f 72 6b 69 6e 67 20 66 | 69 6c 65 20 28 6c 6f 63 |orking f|ile (loc|
|00002660| 6b 66 69 6c 65 73 29 0a | 20 2a 20 66 75 6c 6c 5f |kfiles).| * full_|
|00002670| 6e 61 6d 65 5f 6f 66 5f | 6c 6f 63 6b 5f 66 69 6c |name_of_|lock_fil|
|00002680| 65 20 6e 61 6d 65 5f 6f | 66 5f 64 65 76 69 63 65 |e name_o|f_device|
|00002690| 20 6d 69 6e 6f 72 30 20 | 6d 69 6e 6f 72 31 20 2e | minor0 |minor1 .|
|000026a0| 2e 2e 0a 20 2a 20 66 75 | 6c 6c 20 6e 61 6d 65 20 |... * fu|ll name |
|000026b0| 6f 66 20 66 69 6c 65 73 | 20 6d 75 73 74 20 69 6e |of files| must in|
|000026c0| 63 6c 75 64 65 20 70 61 | 74 68 20 28 69 6e 20 67 |clude pa|th (in g|
|000026d0| 72 65 61 74 20 64 65 74 | 61 69 6c 20 2f 2e 2e 2e |reat det|ail /...|
|000026e0| 2f 2e 2e 2e 2f 2e 2e 2e | 29 0a 20 2a 20 74 68 65 |/.../...|). * the|
|000026f0| 72 65 20 6d 61 79 20 62 | 65 20 61 73 20 6d 61 6e |re may b|e as man|
|00002700| 79 20 61 73 20 4d 41 58 | 50 44 45 56 20 6d 69 6e |y as MAX|PDEV min|
|00002710| 6f 72 20 64 65 76 69 63 | 65 73 20 61 73 73 6f 63 |or devic|es assoc|
|00002720| 69 61 74 65 64 20 77 69 | 74 68 20 6e 61 6d 65 5f |iated wi|th name_|
|00002730| 6f 66 5f 64 65 76 69 63 | 65 0a 20 2a 20 6e 6f 74 |of_devic|e. * not|
|00002740| 65 20 74 68 61 74 20 6e | 61 6d 65 5f 6f 66 5f 64 |e that n|ame_of_d|
|00002750| 65 76 69 63 65 20 6e 65 | 65 64 20 6e 6f 74 20 62 |evice ne|ed not b|
|00002760| 65 20 74 68 65 20 73 61 | 6d 65 20 61 73 20 61 6e |e the sa|me as an|
|00002770| 79 20 6d 69 6e 6f 72 20 | 64 65 76 69 63 65 0a 20 |y minor |device. |
|00002780| 2a 20 65 78 61 6d 70 6c | 65 0a 20 2a 20 2f 65 74 |* exampl|e. * /et|
|00002790| 63 2f 74 61 70 65 30 2e | 6c 6f 63 6b 20 74 61 70 |c/tape0.|lock tap|
|000027a0| 65 30 20 2f 64 65 76 2f | 6d 74 30 20 2f 64 65 76 |e0 /dev/|mt0 /dev|
|000027b0| 2f 6d 74 34 20 2f 64 65 | 76 2f 72 6d 74 30 20 2f |/mt4 /de|v/rmt0 /|
|000027c0| 64 65 76 2f 72 6d 74 34 | 0a 20 2a 20 2f 75 73 72 |dev/rmt4|. * /usr|
|000027d0| 2f 73 70 6f 6f 6c 2f 75 | 75 63 70 2f 4c 43 4b 2e |/spool/u|ucp/LCK.|
|000027e0| 2e 63 75 6c 30 20 63 75 | 6c 30 20 2f 64 65 76 2f |.cul0 cu|l0 /dev/|
|000027f0| 63 75 6c 30 0a 20 2a 0a | 20 2a 20 24 4c 6f 67 3a |cul0. *.| * $Log:|
|00002800| 09 77 69 74 68 2e 63 2c | 76 20 24 0a 20 2a 20 52 |.with.c,|v $. * R|
|00002810| 65 76 69 73 69 6f 6e 20 | 32 2e 30 20 20 38 37 2f |evision |2.0 87/|
|00002820| 31 30 2f 32 36 20 20 30 | 39 3a 33 32 3a 31 35 20 |10/26 0|9:32:15 |
|00002830| 20 63 75 64 63 76 0a 20 | 2a 20 22 53 74 61 62 6c | cudcv. |* "Stabl|
|00002840| 65 22 0a 20 2a 20 0a 20 | 2a 20 52 65 76 69 73 69 |e". * . |* Revisi|
|00002850| 6f 6e 20 31 2e 31 31 20 | 20 38 37 2f 31 30 2f 32 |on 1.11 | 87/10/2|
|00002860| 36 20 20 30 39 3a 31 39 | 3a 33 37 20 20 63 75 64 |6 09:19|:37 cud|
|00002870| 63 76 0a 20 2a 20 43 6c | 65 61 6e 75 70 20 63 6f |cv. * Cl|eanup co|
|00002880| 6d 6d 65 6e 74 73 2c 20 | 6c 69 6e 74 0a 20 2a 20 |mments, |lint. * |
|00002890| 0a 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 31 |. * Revi|sion 1.1|
|000028a0| 30 20 20 38 36 2f 30 39 | 2f 31 37 20 20 30 39 3a |0 86/09|/17 09:|
|000028b0| 30 31 3a 34 32 20 20 63 | 75 64 63 76 0a 20 2a 20 |01:42 c|udcv. * |
|000028c0| 27 77 61 69 74 69 6e 67 | 20 66 6f 72 20 63 6f 6e |'waiting| for con|
|000028d0| 66 69 72 6d 61 74 69 6f | 6e 27 20 6d 65 73 73 61 |firmatio|n' messa|
|000028e0| 67 65 20 77 61 73 6e 27 | 74 20 67 65 74 74 69 6e |ge wasn'|t gettin|
|000028f0| 67 20 6f 75 74 20 69 66 | 20 73 74 64 65 72 72 20 |g out if| stderr |
|00002900| 62 75 66 66 65 72 65 64 | 2e 0a 20 2a 20 0a 20 2a |buffered|.. * . *|
|00002910| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 39 20 20 38 | Revisio|n 1.9 8|
|00002920| 36 2f 30 38 2f 30 36 20 | 20 31 30 3a 33 34 3a 33 |6/08/06 | 10:34:3|
|00002930| 33 20 20 63 75 64 63 76 | 0a 20 2a 20 4d 61 6b 65 |3 cudcv|. * Make|
|00002940| 20 68 61 6e 64 6c 69 6e | 67 20 6f 66 20 6e 75 6c | handlin|g of nul|
|00002950| 6c 20 72 65 73 6f 75 72 | 63 65 20 63 6c 65 61 6e |l resour|ce clean|
|00002960| 65 72 2c 20 61 6c 6c 6f | 77 20 2d 20 61 73 20 6e |er, allo|w - as n|
|00002970| 75 6c 6c 20 72 65 71 75 | 65 73 74 2e 0a 20 2a 20 |ull requ|est.. * |
|00002980| 0a 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 38 |. * Revi|sion 1.8|
|00002990| 20 20 38 36 2f 30 36 2f | 31 37 20 20 31 33 3a 31 | 86/06/|17 13:1|
|000029a0| 34 3a 34 34 20 20 63 75 | 64 63 76 0a 20 2a 20 41 |4:44 cu|dcv. * A|
|000029b0| 6c 6c 6f 77 20 66 75 72 | 74 68 65 72 20 61 72 67 |llow fur|ther arg|
|000029c0| 75 6d 65 6e 74 73 20 74 | 6f 20 62 65 20 70 61 73 |uments t|o be pas|
|000029d0| 73 65 64 20 74 6f 20 74 | 68 65 20 73 68 65 6c 6c |sed to t|he shell|
|000029e0| 0a 20 2a 20 52 65 74 75 | 72 6e 20 73 74 61 74 75 |. * Retu|rn statu|
|000029f0| 73 20 66 72 6f 6d 20 73 | 68 65 6c 6c 0a 20 2a 20 |s from s|hell. * |
|00002a00| 0a 20 2a 20 52 65 76 69 | 73 69 6f 6e 20 31 2e 37 |. * Revi|sion 1.7|
|00002a10| 20 20 38 36 2f 30 36 2f | 31 37 20 20 31 32 3a 32 | 86/06/|17 12:2|
|00002a20| 38 3a 34 35 20 20 63 75 | 64 63 76 0a 20 2a 20 53 |8:45 cu|dcv. * S|
|00002a30| 6c 69 70 20 6f 66 20 74 | 68 65 20 65 64 69 74 6f |lip of t|he edito|
|00002a40| 72 0a 20 2a 20 0a 20 2a | 20 52 65 76 69 73 69 6f |r. * . *| Revisio|
|00002a50| 6e 20 31 2e 36 20 20 38 | 36 2f 30 31 2f 32 34 20 |n 1.6 8|6/01/24 |
|00002a60| 20 31 35 3a 30 31 3a 33 | 36 20 20 63 75 64 63 76 | 15:01:3|6 cudcv|
|00002a70| 0a 20 2a 20 52 65 73 74 | 61 72 74 20 73 68 65 6c |. * Rest|art shel|
|00002a80| 6c 20 77 68 65 6e 20 77 | 69 74 68 20 69 73 20 72 |l when w|ith is r|
|00002a90| 65 73 74 61 72 74 65 64 | 0a 20 2a 20 0a 20 2a 20 |estarted|. * . * |
|00002aa0| 52 65 76 69 73 69 6f 6e | 20 31 2e 35 20 20 38 36 |Revision| 1.5 86|
|00002ab0| 2f 30 31 2f 32 34 20 20 | 31 32 3a 30 39 3a 35 39 |/01/24 |12:09:59|
|00002ac0| 20 20 63 75 64 63 76 0a | 20 2a 20 57 69 74 68 20 | cudcv.| * With |
|00002ad0| 77 6f 75 6c 64 20 68 61 | 6e 67 20 69 66 20 73 68 |would ha|ng if sh|
|00002ae0| 65 6c 6c 20 77 61 73 20 | 73 74 6f 70 70 65 64 0a |ell was |stopped.|
|00002af0| 20 2a 20 0a 20 2a 20 52 | 65 76 69 73 69 6f 6e 20 | * . * R|evision |
|00002b00| 31 2e 34 20 20 38 36 2f | 30 31 2f 32 33 20 20 30 |1.4 86/|01/23 0|
|00002b10| 39 3a 33 38 3a 32 33 20 | 20 63 75 64 63 76 0a 20 |9:38:23 | cudcv. |
|00002b20| 2a 20 57 61 73 20 69 67 | 6e 6f 72 69 6e 67 20 6c |* Was ig|noring l|
|00002b30| 61 73 74 20 64 65 76 69 | 63 65 0a 20 2a 20 0a 20 |ast devi|ce. * . |
|00002b40| 2a 20 52 65 76 69 73 69 | 6f 6e 20 31 2e 33 20 20 |* Revisi|on 1.3 |
|00002b50| 38 36 2f 30 31 2f 32 33 | 20 20 30 39 3a 30 32 3a |86/01/23| 09:02:|
|00002b60| 32 30 20 20 63 75 64 63 | 76 0a 20 2a 20 4d 61 6b |20 cudc|v. * Mak|
|00002b70| 65 20 6d 6f 72 65 20 70 | 6f 72 74 61 62 6c 65 20 |e more p|ortable |
|00002b80| 66 6f 72 20 47 6f 75 6c | 64 0a 20 2a 20 0a 20 2a |for Goul|d. * . *|
|00002b90| 20 52 65 76 69 73 69 6f | 6e 20 31 2e 32 20 20 38 | Revisio|n 1.2 8|
|00002ba0| 36 2f 30 31 2f 32 31 20 | 20 31 35 3a 30 34 3a 33 |6/01/21 | 15:04:3|
|00002bb0| 35 20 20 63 75 64 63 76 | 0a 20 2a 20 41 6c 6c 6f |5 cudcv|. * Allo|
|00002bc0| 77 20 73 65 63 6f 6e 64 | 20 61 72 67 75 6d 65 6e |w second| argumen|
|00002bd0| 74 20 77 69 74 68 20 72 | 65 71 75 65 73 74 20 74 |t with r|equest t|
|00002be0| 6f 20 6f 70 65 72 61 74 | 6f 72 73 0a 20 2a 20 52 |o operat|ors. * R|
|00002bf0| 65 63 6f 72 64 20 75 73 | 65 72 63 6f 64 65 20 6f |ecord us|ercode o|
|00002c00| 66 20 72 65 71 75 65 73 | 74 65 72 0a 20 2a 20 57 |f reques|ter. * W|
|00002c10| 69 74 68 20 6e 6f 20 61 | 72 67 75 6d 65 6e 74 73 |ith no a|rguments|
|00002c20| 20 6c 69 73 74 73 20 63 | 75 72 72 65 6e 74 20 6c | lists c|urrent l|
|00002c30| 6f 63 6b 73 0a 20 2a 20 | 0a 20 2a 20 52 65 76 69 |ocks. * |. * Revi|
|00002c40| 73 69 6f 6e 20 31 2e 31 | 20 20 38 35 2f 31 30 2f |sion 1.1| 85/10/|
|00002c50| 30 37 20 20 31 30 3a 33 | 31 3a 32 35 20 20 63 75 |07 10:3|1:25 cu|
|00002c60| 64 63 76 0a 20 2a 20 49 | 6e 69 74 69 61 6c 20 72 |dcv. * I|nitial r|
|00002c70| 65 76 69 73 69 6f 6e 0a | 20 2a 20 0a 20 2a 2f 0a |evision.| * . */.|
|00002c80| 73 74 61 74 69 63 20 63 | 68 61 72 20 52 43 53 69 |static c|har RCSi|
|00002c90| 64 5b 5d 20 3d 20 22 24 | 48 65 61 64 65 72 3a 20 |d[] = "$|Header: |
|00002ca0| 77 69 74 68 2e 63 2c 76 | 20 32 2e 30 20 38 37 2f |with.c,v| 2.0 87/|
|00002cb0| 31 30 2f 32 36 20 30 39 | 3a 33 32 3a 31 35 20 63 |10/26 09|:32:15 c|
|00002cc0| 75 64 63 76 20 45 78 70 | 20 24 22 3b 0a 23 69 6e |udcv Exp| $";.#in|
|00002cd0| 63 6c 75 64 65 20 3c 63 | 74 79 70 65 2e 68 3e 0a |clude <c|type.h>.|
|00002ce0| 23 69 6e 63 6c 75 64 65 | 20 3c 70 77 64 2e 68 3e |#include| <pwd.h>|
|00002cf0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 69 67 6e 61 |.#includ|e <signa|
|00002d00| 6c 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |l.h>.#in|clude <s|
|00002d10| 74 64 69 6f 2e 68 3e 0a | 23 69 6e 63 6c 75 64 65 |tdio.h>.|#include|
|00002d20| 20 3c 73 74 72 69 6e 67 | 73 2e 68 3e 0a 23 69 6e | <string|s.h>.#in|
|00002d30| 63 6c 75 64 65 20 3c 73 | 79 73 6c 6f 67 2e 68 3e |clude <s|yslog.h>|
|00002d40| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 73 79 73 2f 74 |.#includ|e <sys/t|
|00002d50| 69 6d 65 2e 68 3e 0a 23 | 69 6e 63 6c 75 64 65 20 |ime.h>.#|include |
|00002d60| 3c 73 79 73 2f 74 79 70 | 65 73 2e 68 3e 0a 23 69 |<sys/typ|es.h>.#i|
|00002d70| 6e 63 6c 75 64 65 20 3c | 73 79 73 2f 64 69 72 2e |nclude <|sys/dir.|
|00002d80| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00002d90| 2f 66 69 6c 65 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |/file.h>|.#includ|
|00002da0| 65 20 3c 73 79 73 2f 72 | 65 73 6f 75 72 63 65 2e |e <sys/r|esource.|
|00002db0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 79 73 |h>.#incl|ude <sys|
|00002dc0| 2f 73 74 61 74 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |/stat.h>|.#includ|
|00002dd0| 65 20 3c 73 79 73 2f 77 | 61 69 74 2e 68 3e 0a 0a |e <sys/w|ait.h>..|
|00002de0| 23 69 66 6e 64 65 66 09 | 50 57 5f 4e 41 4d 45 4c |#ifndef.|PW_NAMEL|
|00002df0| 0a 23 64 65 66 69 6e 65 | 09 50 57 5f 4e 41 4d 45 |.#define|.PW_NAME|
|00002e00| 4c 09 38 0a 23 65 6e 64 | 69 66 0a 0a 23 69 66 6e |L.8.#end|if..#ifn|
|00002e10| 64 65 66 20 4c 4f 43 4b | 53 46 49 4c 45 0a 23 64 |def LOCK|SFILE.#d|
|00002e20| 65 66 69 6e 65 09 4c 4f | 43 4b 53 44 49 52 09 22 |efine.LO|CKSDIR."|
|00002e30| 2f 65 74 63 2f 6c 6f 63 | 6b 73 22 0a 23 64 65 66 |/etc/loc|ks".#def|
|00002e40| 69 6e 65 20 4c 4f 43 4b | 53 46 49 4c 45 09 22 2f |ine LOCK|SFILE."/|
|00002e50| 65 74 63 2f 6c 6f 63 6b | 73 2f 6c 6f 63 6b 66 69 |etc/lock|s/lockfi|
|00002e60| 6c 65 73 22 0a 23 65 6e | 64 69 66 0a 23 64 65 66 |les".#en|dif.#def|
|00002e70| 69 6e 65 20 4d 41 58 53 | 54 4c 45 4e 20 20 20 20 |ine MAXS|TLEN |
|00002e80| 20 20 20 20 34 30 20 20 | 20 20 20 20 2f 2a 6d 75 | 40 | /*mu|
|00002e90| 63 68 20 6d 6f 72 65 20 | 74 68 61 6e 20 6e 65 63 |ch more |than nec|
|00002ea0| 65 73 73 61 72 79 2a 2f | 0a 23 64 65 66 69 6e 65 |essary*/|.#define|
|00002eb0| 20 4e 4c 4f 43 4b 53 20 | 20 20 20 20 20 20 20 20 | NLOCKS | |
|00002ec0| 20 31 30 20 20 20 20 20 | 20 2f 2a 20 22 20 20 20 | 10 | /* " |
|00002ed0| 20 22 20 20 20 20 20 22 | 20 20 20 20 20 20 22 20 | " "| " |
|00002ee0| 20 2a 2f 0a 23 64 65 66 | 69 6e 65 20 4d 41 58 50 | */.#def|ine MAXP|
|00002ef0| 44 45 56 20 20 20 20 20 | 20 20 20 20 31 36 09 2f |DEV | 16./|
|00002f00| 2a 20 6d 61 78 20 23 20 | 70 68 79 73 2e 20 64 65 |* max # |phys. de|
|00002f10| 76 69 63 65 73 20 61 73 | 73 6f 63 69 61 74 65 20 |vices as|sociate |
|00002f20| 77 69 74 68 20 61 20 6e | 61 6d 65 2a 2f 0a 23 64 |with a n|ame*/.#d|
|00002f30| 65 66 69 6e 65 20 4f 57 | 4e 45 52 4f 4e 4c 59 20 |efine OW|NERONLY |
|00002f40| 20 20 20 20 20 20 30 36 | 30 30 20 20 20 20 2f 2a | 06|00 /*|
|00002f50| 70 72 6f 74 65 63 74 69 | 6f 6e 20 6d 6f 64 65 20 |protecti|on mode |
|00002f60| 66 6f 72 20 74 68 65 20 | 64 65 76 69 63 65 73 2a |for the |devices*|
|00002f70| 2f 0a 23 64 65 66 69 6e | 65 09 4c 4f 47 4c 45 56 |/.#defin|e.LOGLEV|
|00002f80| 45 4c 09 4c 4f 47 5f 43 | 52 49 54 09 2f 2a 20 6c |EL.LOG_C|RIT./* l|
|00002f90| 65 76 65 6c 20 66 6f 72 | 20 73 79 73 6c 6f 67 27 |evel for| syslog'|
|00002fa0| 73 20 2a 2f 0a 0a 23 64 | 65 66 69 6e 65 20 73 75 |s */..#d|efine su|
|00002fb0| 62 64 65 76 28 4c 50 2c | 6e 29 20 20 20 20 20 28 |bdev(LP,|n) (|
|00002fc0| 26 20 28 20 28 4c 50 29 | 2d 3e 70 68 79 73 64 65 |& ( (LP)|->physde|
|00002fd0| 76 5b 6e 5d 5b 30 5d 29 | 29 20 20 20 20 20 20 20 |v[n][0])|) |
|00002fe0| 20 20 2f 2a 61 6c 6c 20 | 64 61 76 65 27 73 20 66 | /*all |dave's f|
|00002ff0| 61 75 6c 74 2a 2f 0a 23 | 64 65 66 69 6e 65 09 6d |ault*/.#|define.m|
|00003000| 61 73 6b 28 69 29 09 28 | 31 20 3c 3c 20 28 69 2d |ask(i).(|1 << (i-|
|00003010| 31 29 29 09 2f 2a 20 66 | 6f 72 20 73 69 67 6e 61 |1))./* f|or signa|
|00003020| 6c 73 20 2a 2f 0a 0a 46 | 49 4c 45 20 2a 66 6f 70 |ls */..F|ILE *fop|
|00003030| 65 6e 28 29 3b 0a 0a 23 | 69 66 64 65 66 09 52 4c |en();..#|ifdef.RL|
|00003040| 49 4d 49 54 5f 49 4e 54 | 41 43 54 0a 73 74 72 75 |IMIT_INT|ACT.stru|
|00003050| 63 74 20 72 6c 69 6d 69 | 74 20 69 6e 74 61 63 74 |ct rlimi|t intact|
|00003060| 20 3d 20 7b 31 2c 20 31 | 7d 3b 09 09 2f 2a 20 6d | = {1, 1|};../* m|
|00003070| 61 6b 65 20 6f 75 72 73 | 65 6c 76 65 73 20 69 6e |ake ours|elves in|
|00003080| 74 65 72 61 63 74 69 76 | 65 20 2a 2f 0a 23 65 6e |teractiv|e */.#en|
|00003090| 64 69 66 0a 0a 74 79 70 | 65 64 65 66 20 73 74 72 |dif..typ|edef str|
|000030a0| 75 63 74 20 7b 0a 09 63 | 68 61 72 09 6c 6f 6b 5b |uct {..c|har.lok[|
|000030b0| 4d 41 58 53 54 4c 45 4e | 5d 2c 09 09 2f 2a 20 6c |MAXSTLEN|],../* l|
|000030c0| 6f 63 6b 20 28 66 6c 6f | 63 6b 29 20 2a 2f 0a 20 |ock (flo|ck) */. |
|000030d0| 20 20 20 20 20 20 20 09 | 64 65 76 5b 4d 41 58 53 | .|dev[MAXS|
|000030e0| 54 4c 45 4e 5d 2c 09 09 | 2f 2a 20 77 68 61 74 20 |TLEN],..|/* what |
|000030f0| 74 68 65 20 75 73 65 72 | 20 63 61 6c 6c 73 20 69 |the user| calls i|
|00003100| 74 20 28 77 69 74 68 20 | 64 65 76 29 20 2a 2f 0a |t (with |dev) */.|
|00003110| 20 20 20 20 20 20 20 20 | 09 70 68 79 73 64 65 76 | |.physdev|
|00003120| 5b 4d 41 58 50 44 45 56 | 5d 5b 4d 41 58 53 54 4c |[MAXPDEV|][MAXSTL|
|00003130| 45 4e 5d 3b 09 2f 2a 20 | 2f 64 65 76 2f 64 65 76 |EN];./* |/dev/dev|
|00003140| 20 2a 2f 0a 09 69 6e 74 | 09 6c 6f 63 6b 65 64 3b | */..int|.locked;|
|00003150| 09 09 09 2f 2a 67 6f 74 | 20 6c 6f 63 6b 20 6f 6e |.../*got| lock on|
|00003160| 20 74 68 69 73 2a 2f 0a | 7d 20 64 65 76 5f 6c 6b | this*/.|} dev_lk|
|00003170| 3b 0a 0a 64 65 76 5f 6c | 6b 09 6c 6f 63 6b 73 5b |;..dev_l|k.locks[|
|00003180| 4e 4c 4f 43 4b 53 5d 3b | 0a 64 65 76 5f 6c 6b 09 |NLOCKS];|.dev_lk.|
|00003190| 6e 6f 6c 6f 6b 3b 0a 0a | 63 68 61 72 09 2a 70 72 |nolok;..|char.*pr|
|000031a0| 6f 67 6e 61 6d 65 3b 0a | 65 78 74 65 72 6e 09 69 |ogname;.|extern.i|
|000031b0| 6e 74 09 6f 70 74 69 6e | 64 3b 0a 63 68 61 72 09 |nt.optin|d;.char.|
|000031c0| 2a 6d 61 6c 6c 6f 63 28 | 29 2c 20 2a 73 70 72 69 |*malloc(|), *spri|
|000031d0| 6e 74 66 28 29 3b 0a 73 | 74 72 75 63 74 20 70 61 |ntf();.s|truct pa|
|000031e0| 73 73 77 64 20 2a 67 65 | 74 70 77 75 69 64 28 29 |sswd *ge|tpwuid()|
|000031f0| 3b 0a 65 78 74 65 72 6e | 09 63 68 61 72 09 2a 73 |;.extern|.char.*s|
|00003200| 79 73 5f 73 69 67 6c 69 | 73 74 5b 5d 3b 0a 65 78 |ys_sigli|st[];.ex|
|00003210| 74 65 72 6e 09 63 68 61 | 72 09 2a 73 79 73 5f 65 |tern.cha|r.*sys_e|
|00003220| 72 72 6c 69 73 74 5b 5d | 3b 0a 65 78 74 65 72 6e |rrlist[]|;.extern|
|00003230| 09 69 6e 74 09 65 72 72 | 6e 6f 3b 0a 0a 69 6e 74 |.int.err|no;..int|
|00003240| 20 09 73 69 6c 65 6e 74 | 20 3d 20 30 3b 0a 69 6e | .silent| = 0;.in|
|00003250| 74 20 09 6e 6f 77 61 69 | 74 20 3d 20 30 3b 09 09 |t .nowai|t = 0;..|
|00003260| 2f 2a 20 64 6f 6e 27 74 | 20 77 61 69 74 20 75 6e |/* don't| wait un|
|00003270| 74 69 6c 20 61 76 61 69 | 6c 61 62 6c 65 20 2a 2f |til avai|lable */|
|00003280| 0a 69 6e 74 20 09 6e 65 | 72 72 73 20 3d 20 30 3b |.int .ne|rrs = 0;|
|00003290| 0a 69 6e 74 09 6e 6c 6f | 63 6b 20 3d 20 30 3b 0a |.int.nlo|ck = 0;.|
|000032a0| 69 6e 74 09 52 6f 6f 74 | 75 69 64 20 3d 20 30 2c |int.Root|uid = 0,|
|000032b0| 20 52 6f 6f 74 67 69 64 | 20 3d 20 33 3b 20 09 2f | Rootgid| = 3; ./|
|000032c0| 2a 20 6d 61 67 69 63 20 | 6e 75 6d 62 65 72 73 20 |* magic |numbers |
|000032d0| 2a 2f 0a 69 6e 74 20 09 | 75 75 69 64 2c 20 75 67 |*/.int .|uuid, ug|
|000032e0| 69 64 3b 0a 63 68 61 72 | 20 09 2a 72 65 73 6f 75 |id;.char| .*resou|
|000032f0| 72 63 65 3b 0a 69 6e 74 | 09 6e 65 65 64 72 65 71 |rce;.int|.needreq|
|00003300| 75 65 73 74 20 3d 20 30 | 3b 09 2f 2a 20 67 6f 74 |uest = 0|;./* got|
|00003310| 20 72 65 73 6f 75 72 63 | 65 2c 20 6e 65 65 64 20 | resourc|e, need |
|00003320| 65 78 74 72 61 20 72 65 | 71 75 65 73 74 20 2a 2f |extra re|quest */|
|00003330| 0a 69 6e 74 09 72 65 71 | 75 65 73 74 65 64 20 3d |.int.req|uested =|
|00003340| 20 30 3b 09 09 2f 2a 20 | 68 61 76 65 20 77 61 72 | 0;../* |have war|
|00003350| 6e 65 64 20 6f 66 20 6e | 65 65 64 2c 20 77 68 69 |ned of n|eed, whi|
|00003360| 6c 65 20 77 61 69 74 69 | 6e 67 20 2a 2f 0a 69 6e |le waiti|ng */.in|
|00003370| 74 09 66 75 6c 66 69 6c | 6c 65 64 20 3d 20 30 3b |t.fulfil|led = 0;|
|00003380| 09 09 2f 2a 20 72 65 71 | 75 65 73 74 20 66 75 6c |../* req|uest ful|
|00003390| 66 69 6c 6c 65 64 20 2a | 2f 0a 73 74 72 75 63 74 |filled *|/.struct|
|000033a0| 20 70 61 73 73 77 64 20 | 2a 70 77 3b 0a 63 68 61 | passwd |*pw;.cha|
|000033b0| 72 09 62 75 66 5b 42 55 | 46 53 49 5a 5d 3b 0a 63 |r.buf[BU|FSIZ];.c|
|000033c0| 68 61 72 09 2a 2a 73 68 | 65 6c 6c 61 72 67 73 3b |har.**sh|ellargs;|
|000033d0| 0a 0a 76 6f 69 64 09 70 | 72 69 6e 74 5f 6c 6f 63 |..void.p|rint_loc|
|000033e0| 6b 73 28 29 3b 0a 0a 6d | 61 69 6e 28 61 72 67 63 |ks();..m|ain(argc|
|000033f0| 2c 61 72 67 76 29 0a 69 | 6e 74 20 61 72 67 63 3b |,argv).i|nt argc;|
|00003400| 0a 63 68 61 72 20 2a 61 | 72 67 76 5b 5d 3b 0a 7b |.char *a|rgv[];.{|
|00003410| 0a 20 20 20 20 20 20 20 | 20 72 65 67 69 73 74 65 |. | registe|
|00003420| 72 20 69 6e 74 20 09 69 | 2c 20 70 64 65 76 3b 0a |r int .i|, pdev;.|
|00003430| 20 20 20 20 20 20 20 20 | 72 65 67 69 73 74 65 72 | |register|
|00003440| 20 64 65 76 5f 6c 6b 20 | 2a 6c 6b 70 3b 0a 09 63 | dev_lk |*lkp;..c|
|00003450| 68 61 72 09 2a 72 65 71 | 75 65 73 74 20 3d 20 4e |har.*req|uest = N|
|00003460| 55 4c 4c 3b 0a 20 20 20 | 20 20 20 20 20 69 6e 74 |ULL;. | int|
|00003470| 20 09 63 2c 20 6c 6f 63 | 6b 66 69 6c 65 2c 20 6f | .c, loc|kfile, o|
|00003480| 6d 61 73 6b 3b 0a 09 69 | 6e 74 20 09 6d 79 70 69 |mask;..i|nt .mypi|
|00003490| 64 20 3d 20 67 65 74 70 | 69 64 28 29 3b 0a 09 69 |d = getp|id();..i|
|000034a0| 6e 74 09 63 6c 65 61 6e | 75 70 28 29 2c 20 66 75 |nt.clean|up(), fu|
|000034b0| 6c 66 69 6c 28 29 3b 0a | 0a 09 75 75 69 64 20 3d |lfil();.|..uuid =|
|000034c0| 20 67 65 74 75 69 64 28 | 29 3b 0a 09 75 67 69 64 | getuid(|);..ugid|
|000034d0| 20 3d 20 67 65 74 67 69 | 64 28 29 3b 0a 09 69 66 | = getgi|d();..if|
|000034e0| 20 28 28 70 77 20 3d 20 | 67 65 74 70 77 75 69 64 | ((pw = |getpwuid|
|000034f0| 28 75 75 69 64 29 29 20 | 3d 3d 20 28 73 74 72 75 |(uuid)) |== (stru|
|00003500| 63 74 20 70 61 73 73 77 | 64 20 2a 29 4e 55 4c 4c |ct passw|d *)NULL|
|00003510| 29 20 7b 0a 09 20 20 20 | 20 50 72 69 6e 74 66 28 |) {.. | Printf(|
|00003520| 22 57 68 6f 20 61 72 65 | 20 79 6f 75 20 3f 5c 6e |"Who are| you ?\n|
|00003530| 22 29 3b 0a 09 20 20 20 | 20 65 78 69 74 28 31 29 |");.. | exit(1)|
|00003540| 3b 0a 09 7d 0a 09 28 76 | 6f 69 64 29 20 65 6e 64 |;..}..(v|oid) end|
|00003550| 70 77 65 6e 74 28 29 3b | 0a 09 70 72 6f 67 6e 61 |pwent();|..progna|
|00003560| 6d 65 20 3d 20 61 72 67 | 76 5b 30 5d 3b 0a 09 77 |me = arg|v[0];..w|
|00003570| 68 69 6c 65 20 28 28 63 | 20 3d 20 67 65 74 6f 70 |hile ((c| = getop|
|00003580| 74 28 61 72 67 63 2c 20 | 61 72 67 76 2c 20 22 73 |t(argc, |argv, "s|
|00003590| 6e 22 29 29 20 21 3d 20 | 45 4f 46 29 0a 09 20 20 |n")) != |EOF).. |
|000035a0| 20 20 73 77 69 74 63 68 | 20 28 63 29 20 7b 0a 09 | switch| (c) {..|
|000035b0| 09 63 61 73 65 20 27 73 | 27 3a 09 73 69 6c 65 6e |.case 's|':.silen|
|000035c0| 74 2b 2b 3b 20 62 72 65 | 61 6b 3b 0a 09 09 63 61 |t++; bre|ak;...ca|
|000035d0| 73 65 20 27 6e 27 3a 09 | 6e 6f 77 61 69 74 2b 2b |se 'n':.|nowait++|
|000035e0| 3b 20 62 72 65 61 6b 3b | 0a 09 09 63 61 73 65 20 |; break;|...case |
|000035f0| 27 3f 27 3a 09 6e 65 72 | 72 73 2b 2b 3b 20 20 62 |'?':.ner|rs++; b|
|00003600| 72 65 61 6b 3b 0a 09 20 | 20 20 20 7d 0a 20 20 20 |reak;.. | }. |
|00003610| 20 20 20 20 20 69 66 20 | 28 6e 65 72 72 73 29 7b | if |(nerrs){|
|00003620| 0a 09 20 20 20 20 50 72 | 69 6e 74 66 28 22 75 73 |.. Pr|intf("us|
|00003630| 61 67 65 3a 20 25 73 20 | 5b 2d 73 6e 5d 20 64 65 |age: %s |[-sn] de|
|00003640| 76 69 63 65 20 5b 72 65 | 71 75 65 73 74 20 5b 70 |vice [re|quest [p|
|00003650| 61 72 61 6d 65 74 65 72 | 73 5d 5d 5c 6e 22 2c 0a |arameter|s]]\n",.|
|00003660| 09 09 70 72 6f 67 6e 61 | 6d 65 29 3b 0a 09 20 20 |..progna|me);.. |
|00003670| 20 20 50 72 69 6e 74 66 | 28 22 65 67 3a 20 20 20 | Printf|("eg: |
|00003680| 20 25 73 20 74 61 70 65 | 20 5c 22 63 75 64 63 76 | %s tape| \"cudcv|
|00003690| 27 73 20 74 61 70 65 20 | 66 6f 72 20 72 65 61 64 |'s tape |for read|
|000036a0| 2c 20 70 6c 65 61 73 65 | 5c 22 22 2c 0a 09 09 70 |, please|\"",...p|
|000036b0| 72 6f 67 6e 61 6d 65 29 | 3b 0a 09 20 20 20 20 50 |rogname)|;.. P|
|000036c0| 72 69 6e 74 66 28 22 20 | 2d 63 20 64 64 20 69 66 |rintf(" |-c dd if|
|000036d0| 3d 2f 64 65 76 2f 72 6d | 74 38 20 2e 2e 2e 5c 6e |=/dev/rm|t8 ...\n|
|000036e0| 22 29 3b 0a 09 20 20 20 | 20 65 78 69 74 28 31 29 |");.. | exit(1)|
|000036f0| 3b 0a 09 7d 0a 20 20 20 | 20 20 20 20 20 69 66 28 |;..}. | if(|
|00003700| 28 6e 6c 6f 63 6b 20 3d | 20 72 65 61 64 5f 6c 6f |(nlock =| read_lo|
|00003710| 6b 73 28 4c 4f 43 4b 53 | 46 49 4c 45 2c 20 6c 6f |ks(LOCKS|FILE, lo|
|00003720| 63 6b 73 29 29 20 3c 20 | 30 29 7b 0a 09 20 20 20 |cks)) < |0){.. |
|00003730| 20 50 72 69 6e 74 66 28 | 22 25 73 3a 25 73 20 75 | Printf(|"%s:%s u|
|00003740| 6e 6f 70 65 6e 61 62 6c | 65 20 6f 72 20 6d 65 73 |nopenabl|e or mes|
|00003750| 73 65 64 20 75 70 2e 5c | 6e 22 2c 70 72 6f 67 6e |sed up.\|n",progn|
|00003760| 61 6d 65 2c 4c 4f 43 4b | 53 46 49 4c 45 29 3b 0a |ame,LOCK|SFILE);.|
|00003770| 09 20 20 20 20 65 78 69 | 74 28 31 29 3b 0a 09 7d |. exi|t(1);..}|
|00003780| 0a 20 20 20 20 20 20 20 | 20 2f 2a 20 6c 6f 63 6b |. | /* lock|
|00003790| 73 20 68 61 76 65 20 62 | 65 65 6e 20 72 65 61 64 |s have b|een read|
|000037a0| 2d 69 6e 20 2a 2f 0a 0a | 09 69 66 20 28 61 72 67 |-in */..|.if (arg|
|000037b0| 63 20 3d 3d 20 6f 70 74 | 69 6e 64 29 20 7b 0a 09 |c == opt|ind) {..|
|000037c0| 20 20 20 20 70 72 69 6e | 74 5f 6c 6f 63 6b 73 28 | prin|t_locks(|
|000037d0| 29 3b 0a 09 20 20 20 20 | 65 78 69 74 28 30 29 3b |);.. |exit(0);|
|000037e0| 0a 09 7d 0a 0a 20 20 20 | 20 20 20 20 20 2f 2a 63 |..}.. | /*c|
|000037f0| 61 6e 27 74 20 62 65 20 | 69 6e 74 65 72 72 75 70 |an't be |interrup|
|00003800| 74 65 64 20 6f 6e 63 65 | 20 77 65 20 73 74 61 72 |ted once| we star|
|00003810| 74 20 6c 69 6e 6b 69 6e | 67 20 74 68 69 6e 67 73 |t linkin|g things|
|00003820| 20 73 6f 20 2e 2e 2e 2a | 2f 0a 09 6f 6d 61 73 6b | so ...*|/..omask|
|00003830| 20 3d 20 73 69 67 73 65 | 74 6d 61 73 6b 28 28 69 | = sigse|tmask((i|
|00003840| 6e 74 29 30 78 37 66 66 | 66 66 66 66 66 29 3b 0a |nt)0x7ff|fffff);.|
|00003850| 20 20 20 20 20 20 20 20 | 66 6f 72 28 69 20 3d 20 | |for(i = |
|00003860| 31 3b 20 69 20 3c 20 4e | 53 49 47 3b 20 69 2b 2b |1; i < N|SIG; i++|
|00003870| 29 20 7b 0a 09 09 2f 2a | 20 61 6c 6c 6f 77 20 73 |) {.../*| allow s|
|00003880| 74 6f 70 70 69 6e 67 20 | 2a 2f 0a 09 09 69 66 20 |topping |*/...if |
|00003890| 28 69 20 3d 3d 20 53 49 | 47 54 53 54 50 20 7c 7c |(i == SI|GTSTP |||
|000038a0| 20 69 20 3d 3d 20 53 49 | 47 54 54 49 4e 20 7c 7c | i == SI|GTTIN |||
|000038b0| 20 69 20 3d 3d 20 53 49 | 47 54 54 4f 55 29 20 63 | i == SI|GTTOU) c|
|000038c0| 6f 6e 74 69 6e 75 65 3b | 0a 09 09 2f 2a 20 64 6f |ontinue;|.../* do|
|000038d0| 6e 27 74 20 63 61 74 63 | 68 20 74 68 6f 73 65 20 |n't catc|h those |
|000038e0| 6e 6f 72 6d 61 6c 6c 79 | 20 69 67 6e 6f 72 65 64 |normally| ignored|
|000038f0| 20 2a 2f 0a 09 09 69 66 | 20 28 69 20 3d 3d 20 53 | */...if| (i == S|
|00003900| 49 47 55 52 47 20 20 7c | 7c 20 69 20 3d 3d 20 53 |IGURG ||| i == S|
|00003910| 49 47 43 4f 4e 54 20 7c | 7c 0a 09 09 20 20 20 20 |IGCONT |||... |
|00003920| 69 20 3d 3d 20 53 49 47 | 43 48 4c 44 20 7c 7c 20 |i == SIG|CHLD || |
|00003930| 69 20 3d 3d 20 53 49 47 | 49 4f 0a 23 69 66 64 65 |i == SIG|IO.#ifde|
|00003940| 66 09 53 49 47 45 4e 51 | 0a 09 09 09 20 20 20 20 |f.SIGENQ|.... |
|00003950| 20 20 20 20 20 7c 7c 20 | 69 20 3d 3d 20 53 49 47 | || |i == SIG|
|00003960| 45 4e 51 0a 23 65 6e 64 | 69 66 0a 09 09 09 29 20 |ENQ.#end|if....) |
|00003970| 63 6f 6e 74 69 6e 75 65 | 3b 0a 09 09 2f 2a 20 64 |continue|;.../* d|
|00003980| 6f 6e 27 74 20 63 61 74 | 63 68 20 74 68 6f 73 65 |on't cat|ch those|
|00003990| 20 63 75 72 72 65 6e 74 | 6c 79 20 69 67 6e 6f 72 | current|ly ignor|
|000039a0| 65 64 20 2a 2f 0a 09 09 | 69 66 20 28 73 69 67 6e |ed */...|if (sign|
|000039b0| 61 6c 28 69 2c 20 63 6c | 65 61 6e 75 70 29 20 3d |al(i, cl|eanup) =|
|000039c0| 3d 20 53 49 47 5f 49 47 | 4e 29 0a 09 09 09 28 76 |= SIG_IG|N)....(v|
|000039d0| 6f 69 64 29 20 73 69 67 | 6e 61 6c 28 69 2c 20 53 |oid) sig|nal(i, S|
|000039e0| 49 47 5f 49 47 4e 29 3b | 0a 09 7d 0a 09 28 76 6f |IG_IGN);|..}..(vo|
|000039f0| 69 64 29 20 73 69 67 73 | 65 74 6d 61 73 6b 28 6f |id) sigs|etmask(o|
|00003a00| 6d 61 73 6b 29 3b 0a 09 | 2f 2a 20 64 6f 6e 27 74 |mask);..|/* don't|
|00003a10| 20 77 61 6e 74 20 74 6f | 20 67 65 74 20 63 6c 6f | want to| get clo|
|00003a20| 62 62 65 72 65 64 20 62 | 79 20 58 43 50 55 20 65 |bbered b|y XCPU e|
|00003a30| 69 74 68 65 72 20 2a 2f | 0a 23 69 66 64 65 66 09 |ither */|.#ifdef.|
|00003a40| 52 4c 49 4d 49 54 5f 49 | 4e 54 41 43 54 0a 09 69 |RLIMIT_I|NTACT..i|
|00003a50| 66 20 28 73 65 74 72 6c | 69 6d 69 74 28 52 4c 49 |f (setrl|imit(RLI|
|00003a60| 4d 49 54 5f 49 4e 54 41 | 43 54 2c 20 26 69 6e 74 |MIT_INTA|CT, &int|
|00003a70| 61 63 74 29 29 20 7b 0a | 09 09 70 65 72 72 6f 72 |act)) {.|..perror|
|00003a80| 28 22 73 65 74 72 6c 69 | 6d 69 74 22 29 3b 0a 09 |("setrli|mit");..|
|00003a90| 09 65 78 69 74 28 31 29 | 3b 0a 09 7d 0a 23 65 6e |.exit(1)|;..}.#en|
|00003aa0| 64 69 66 0a 20 20 20 20 | 20 20 20 20 2f 2a 6e 6f |dif. | /*no|
|00003ab0| 77 20 67 65 74 20 72 65 | 73 6f 75 72 63 65 2a 2f |w get re|source*/|
|00003ac0| 0a 09 72 65 73 6f 75 72 | 63 65 20 3d 20 61 72 67 |..resour|ce = arg|
|00003ad0| 76 5b 6f 70 74 69 6e 64 | 2b 2b 5d 3b 0a 09 69 66 |v[optind|++];..if|
|00003ae0| 20 28 61 72 67 63 20 3e | 20 6f 70 74 69 6e 64 29 | (argc >| optind)|
|00003af0| 20 7b 0a 09 20 20 20 20 | 72 65 71 75 65 73 74 20 | {.. |request |
|00003b00| 3d 20 61 72 67 76 5b 6f | 70 74 69 6e 64 2b 2b 5d |= argv[o|ptind++]|
|00003b10| 3b 0a 09 20 20 20 20 69 | 66 20 28 21 2a 72 65 71 |;.. i|f (!*req|
|00003b20| 75 65 73 74 20 7c 7c 20 | 21 73 74 72 63 6d 70 28 |uest || |!strcmp(|
|00003b30| 72 65 71 75 65 73 74 2c | 20 22 2d 22 29 29 0a 09 |request,| "-"))..|
|00003b40| 09 72 65 71 75 65 73 74 | 20 3d 20 4e 55 4c 4c 3b |.request| = NULL;|
|00003b50| 0a 09 20 20 20 20 28 76 | 6f 69 64 29 20 73 70 72 |.. (v|oid) spr|
|00003b60| 69 6e 74 66 28 62 75 66 | 2c 20 22 28 25 73 29 20 |intf(buf|, "(%s) |
|00003b70| 77 69 74 68 22 2c 20 70 | 77 2d 3e 70 77 5f 6e 61 |with", p|w->pw_na|
|00003b80| 6d 65 29 3b 0a 09 20 20 | 20 20 6f 70 65 6e 6c 6f |me);.. | openlo|
|00003b90| 67 28 62 75 66 2c 20 4c | 4f 47 5f 50 49 44 29 3b |g(buf, L|OG_PID);|
|00003ba0| 0a 09 7d 0a 09 73 68 65 | 6c 6c 61 72 67 73 20 3d |..}..she|llargs =|
|00003bb0| 20 26 61 72 67 76 5b 6f | 70 74 69 6e 64 2d 31 5d | &argv[o|ptind-1]|
|00003bc0| 3b 0a 09 69 66 20 28 21 | 73 74 72 63 6d 70 28 72 |;..if (!|strcmp(r|
|00003bd0| 65 73 6f 75 72 63 65 2c | 20 22 2d 22 29 29 20 7b |esource,| "-")) {|
|00003be0| 0a 09 09 72 65 73 6f 75 | 72 63 65 20 3d 20 4e 55 |...resou|rce = NU|
|00003bf0| 4c 4c 3b 0a 09 09 6c 6b | 70 20 3d 20 26 6e 6f 6c |LL;...lk|p = &nol|
|00003c00| 6f 6b 3b 0a 09 09 28 76 | 6f 69 64 29 20 73 70 72 |ok;...(v|oid) spr|
|00003c10| 69 6e 74 66 28 6c 6b 70 | 2d 3e 6c 6f 6b 2c 20 22 |intf(lkp|->lok, "|
|00003c20| 25 73 2f 25 64 22 2c 20 | 4c 4f 43 4b 53 44 49 52 |%s/%d", |LOCKSDIR|
|00003c30| 2c 20 67 65 74 70 69 64 | 28 29 29 3b 0a 09 09 28 |, getpid|());...(|
|00003c40| 76 6f 69 64 29 20 73 74 | 72 63 70 79 28 6c 6b 70 |void) st|rcpy(lkp|
|00003c50| 2d 3e 64 65 76 2c 20 22 | 72 65 71 75 65 73 74 22 |->dev, "|request"|
|00003c60| 29 3b 0a 09 7d 20 65 6c | 73 65 20 7b 0a 09 09 66 |);..} el|se {...f|
|00003c70| 6f 72 20 28 69 20 3d 20 | 30 3b 69 20 3c 20 6e 6c |or (i = |0;i < nl|
|00003c80| 6f 63 6b 3b 20 69 2b 2b | 29 0a 09 20 20 20 20 09 |ock; i++|).. .|
|00003c90| 09 69 66 20 28 73 74 72 | 63 6d 70 28 6c 6f 63 6b |.if (str|cmp(lock|
|00003ca0| 73 5b 69 5d 2e 64 65 76 | 2c 20 72 65 73 6f 75 72 |s[i].dev|, resour|
|00003cb0| 63 65 29 20 3d 3d 20 30 | 29 20 62 72 65 61 6b 3b |ce) == 0|) break;|
|00003cc0| 0a 20 20 20 20 20 20 20 | 20 09 69 66 28 69 20 3e |. | .if(i >|
|00003cd0| 3d 20 6e 6c 6f 63 6b 29 | 7b 0a 09 09 09 50 72 69 |= nlock)|{....Pri|
|00003ce0| 6e 74 66 28 22 49 20 64 | 6f 6e 27 74 20 6b 6e 6f |ntf("I d|on't kno|
|00003cf0| 77 20 68 6f 77 20 74 6f | 20 67 65 74 20 25 73 2e |w how to| get %s.|
|00003d00| 5c 6e 22 2c 20 72 65 73 | 6f 75 72 63 65 29 3b 0a |\n", res|ource);.|
|00003d10| 09 09 09 6e 65 72 72 73 | 2b 2b 3b 0a 09 09 09 63 |...nerrs|++;....c|
|00003d20| 6c 65 61 6e 75 70 28 30 | 29 3b 0a 09 09 7d 0a 09 |leanup(0|);...}..|
|00003d30| 09 6c 6b 70 20 3d 20 26 | 6c 6f 63 6b 73 5b 69 5d |.lkp = &|locks[i]|
|00003d40| 3b 0a 09 7d 0a 0a 09 69 | 66 20 28 28 6c 6f 63 6b |;..}...i|f ((lock|
|00003d50| 66 69 6c 65 20 3d 20 6f | 70 65 6e 28 6c 6b 70 2d |file = o|pen(lkp-|
|00003d60| 3e 6c 6f 6b 2c 20 4f 5f | 57 52 4f 4e 4c 59 7c 4f |>lok, O_|WRONLY|O|
|00003d70| 5f 43 52 45 41 54 2c 20 | 30 36 34 34 29 29 20 3c |_CREAT, |0644)) <|
|00003d80| 20 30 29 20 7b 0a 09 20 | 20 20 20 50 72 69 6e 74 | 0) {.. | Print|
|00003d90| 66 28 22 25 73 20 3a 20 | 63 61 6e 6e 6f 74 20 6f |f("%s : |cannot o|
|00003da0| 70 65 6e 20 25 73 20 3a | 20 25 73 5c 6e 22 2c 0a |pen %s :| %s\n",.|
|00003db0| 09 09 70 72 6f 67 6e 61 | 6d 65 2c 20 6c 6b 70 2d |..progna|me, lkp-|
|00003dc0| 3e 6c 6f 6b 2c 20 73 79 | 73 5f 65 72 72 6c 69 73 |>lok, sy|s_errlis|
|00003dd0| 74 5b 65 72 72 6e 6f 5d | 29 3b 0a 09 20 20 20 20 |t[errno]|);.. |
|00003de0| 6e 65 72 72 73 2b 2b 3b | 0a 09 20 20 20 20 63 6c |nerrs++;|.. cl|
|00003df0| 65 61 6e 75 70 28 30 29 | 3b 0a 09 7d 0a 09 69 66 |eanup(0)|;..}..if|
|00003e00| 20 28 66 6c 6f 63 6b 28 | 6c 6f 63 6b 66 69 6c 65 | (flock(|lockfile|
|00003e10| 2c 20 4c 4f 43 4b 5f 45 | 58 7c 4c 4f 43 4b 5f 4e |, LOCK_E|X|LOCK_N|
|00003e20| 42 29 20 3c 20 30 29 20 | 7b 0a 09 20 20 20 20 69 |B) < 0) |{.. i|
|00003e30| 66 20 28 21 72 65 73 6f | 75 72 63 65 29 20 7b 0a |f (!reso|urce) {.|
|00003e40| 09 09 50 72 69 6e 74 66 | 28 22 25 73 3a 20 63 61 |..Printf|("%s: ca|
|00003e50| 6e 6e 6f 74 20 6c 6f 63 | 6b 20 25 73 20 3a 20 25 |nnot loc|k %s : %|
|00003e60| 73 5c 6e 22 2c 0a 09 09 | 20 20 20 20 70 72 6f 67 |s\n",...| prog|
|00003e70| 6e 61 6d 65 2c 20 6c 6b | 70 2d 3e 6c 6f 6b 2c 20 |name, lk|p->lok, |
|00003e80| 73 79 73 5f 65 72 72 6c | 69 73 74 5b 65 72 72 6e |sys_errl|ist[errn|
|00003e90| 6f 5d 29 3b 0a 09 09 6e | 65 72 72 73 2b 2b 3b 0a |o]);...n|errs++;.|
|00003ea0| 09 09 63 6c 65 61 6e 75 | 70 28 30 29 3b 0a 09 20 |..cleanu|p(0);.. |
|00003eb0| 20 20 20 7d 0a 09 20 20 | 20 20 50 72 69 6e 74 66 | }.. | Printf|
|00003ec0| 28 22 25 73 20 69 73 20 | 69 6e 20 75 73 65 22 2c |("%s is |in use",|
|00003ed0| 20 6c 6b 70 2d 3e 64 65 | 76 29 3b 0a 09 20 20 20 | lkp->de|v);.. |
|00003ee0| 20 69 66 20 28 6e 6f 77 | 61 69 74 29 20 7b 0a 09 | if (now|ait) {..|
|00003ef0| 09 50 72 69 6e 74 66 28 | 22 20 2d 20 74 72 79 20 |.Printf(|" - try |
|00003f00| 61 67 61 69 6e 20 6c 61 | 74 65 72 2e 5c 6e 22 29 |again la|ter.\n")|
|00003f10| 3b 0a 09 09 6e 65 72 72 | 73 2b 2b 3b 0a 09 09 63 |;...nerr|s++;...c|
|00003f20| 6c 65 61 6e 75 70 28 30 | 29 3b 0a 09 20 20 20 20 |leanup(0|);.. |
|00003f30| 7d 20 65 6c 73 65 20 7b | 0a 09 09 50 72 69 6e 74 |} else {|...Print|
|00003f40| 66 28 22 20 2e 2e 2e 20 | 77 61 69 74 69 6e 67 22 |f(" ... |waiting"|
|00003f50| 29 3b 0a 09 09 28 76 6f | 69 64 29 20 66 66 6c 75 |);...(vo|id) fflu|
|00003f60| 73 68 28 73 74 64 65 72 | 72 29 3b 0a 09 09 69 66 |sh(stder|r);...if|
|00003f70| 20 28 72 65 71 75 65 73 | 74 29 0a 09 09 20 20 20 | (reques|t)... |
|00003f80| 20 73 79 73 6c 6f 67 28 | 4c 4f 47 4c 45 56 45 4c | syslog(|LOGLEVEL|
|00003f90| 2c 20 22 77 69 6c 6c 20 | 6e 65 65 64 20 25 73 2c |, "will |need %s,|
|00003fa0| 20 77 68 65 6e 20 25 73 | 20 69 73 20 61 76 61 69 | when %s| is avai|
|00003fb0| 6c 61 62 6c 65 22 2c 0a | 09 09 09 72 65 71 75 65 |lable",.|...reque|
|00003fc0| 73 74 2c 20 72 65 73 6f | 75 72 63 65 29 3b 0a 09 |st, reso|urce);..|
|00003fd0| 09 72 65 71 75 65 73 74 | 65 64 2b 2b 3b 0a 09 09 |.request|ed++;...|
|00003fe0| 69 66 20 28 66 6c 6f 63 | 6b 28 6c 6f 63 6b 66 69 |if (floc|k(lockfi|
|00003ff0| 6c 65 2c 20 4c 4f 43 4b | 5f 45 58 29 20 3c 20 30 |le, LOCK|_EX) < 0|
|00004000| 29 20 7b 0a 09 09 20 20 | 20 20 50 72 69 6e 74 66 |) {... | Printf|
|00004010| 28 22 5c 6e 25 73 20 3a | 20 63 61 6e 6e 6f 74 20 |("\n%s :| cannot |
|00004020| 6c 6f 63 6b 20 3a 20 25 | 73 5c 6e 22 2c 0a 09 09 |lock : %|s\n",...|
|00004030| 09 70 72 6f 67 6e 61 6d | 65 2c 20 73 79 73 5f 65 |.prognam|e, sys_e|
|00004040| 72 72 6c 69 73 74 5b 65 | 72 72 6e 6f 5d 29 3b 0a |rrlist[e|rrno]);.|
|00004050| 09 09 20 20 20 20 6e 65 | 72 72 73 2b 2b 3b 0a 09 |.. ne|rrs++;..|
|00004060| 09 20 20 20 20 63 6c 65 | 61 6e 75 70 28 30 29 3b |. cle|anup(0);|
|00004070| 0a 09 09 7d 20 65 6c 73 | 65 0a 09 09 20 20 20 20 |...} els|e... |
|00004080| 50 72 69 6e 74 66 28 22 | 5c 6e 22 29 3b 0a 09 20 |Printf("|\n");.. |
|00004090| 20 20 20 7d 0a 09 7d 0a | 09 28 76 6f 69 64 29 20 | }..}.|.(void) |
|000040a0| 77 72 69 74 65 28 6c 6f | 63 6b 66 69 6c 65 2c 20 |write(lo|ckfile, |
|000040b0| 28 63 68 61 72 20 2a 29 | 26 6d 79 70 69 64 2c 20 |(char *)|&mypid, |
|000040c0| 73 69 7a 65 6f 66 28 69 | 6e 74 29 29 3b 0a 09 28 |sizeof(i|nt));..(|
|000040d0| 76 6f 69 64 29 20 77 72 | 69 74 65 28 6c 6f 63 6b |void) wr|ite(lock|
|000040e0| 66 69 6c 65 2c 20 70 77 | 2d 3e 70 77 5f 6e 61 6d |file, pw|->pw_nam|
|000040f0| 65 2c 20 50 57 5f 4e 41 | 4d 45 4c 29 3b 0a 09 28 |e, PW_NA|MEL);..(|
|00004100| 76 6f 69 64 29 20 66 74 | 72 75 6e 63 61 74 65 28 |void) ft|runcate(|
|00004110| 6c 6f 63 6b 66 69 6c 65 | 2c 20 73 69 7a 65 6f 66 |lockfile|, sizeof|
|00004120| 28 69 6e 74 29 20 2b 20 | 50 57 5f 4e 41 4d 45 4c |(int) + |PW_NAMEL|
|00004130| 29 3b 0a 09 6c 6b 70 2d | 3e 6c 6f 63 6b 65 64 2b |);..lkp-|>locked+|
|00004140| 2b 3b 0a 09 66 6f 72 28 | 70 64 65 76 20 3d 20 30 |+;..for(|pdev = 0|
|00004150| 3b 70 64 65 76 20 3c 20 | 4d 41 58 50 44 45 56 20 |;pdev < |MAXPDEV |
|00004160| 26 26 20 28 2a 73 75 62 | 64 65 76 28 6c 6b 70 2c |&& (*sub|dev(lkp,|
|00004170| 70 64 65 76 29 29 3b 70 | 64 65 76 2b 2b 29 7b 0a |pdev));p|dev++){.|
|00004180| 09 20 20 20 20 28 76 6f | 69 64 29 20 63 68 6f 77 |. (vo|id) chow|
|00004190| 6e 28 20 73 75 62 64 65 | 76 28 6c 6b 70 2c 70 64 |n( subde|v(lkp,pd|
|000041a0| 65 76 29 2c 75 75 69 64 | 2c 75 67 69 64 20 29 3b |ev),uuid|,ugid );|
|000041b0| 0a 09 20 20 20 20 28 76 | 6f 69 64 29 20 63 68 6d |.. (v|oid) chm|
|000041c0| 6f 64 28 20 73 75 62 64 | 65 76 28 6c 6b 70 2c 70 |od( subd|ev(lkp,p|
|000041d0| 64 65 76 29 2c 4f 57 4e | 45 52 4f 4e 4c 59 29 3b |dev),OWN|ERONLY);|
|000041e0| 0a 09 7d 0a 09 69 66 20 | 28 72 65 73 6f 75 72 63 |..}..if |(resourc|
|000041f0| 65 29 0a 09 09 50 72 69 | 6e 74 66 28 22 25 73 20 |e)...Pri|ntf("%s |
|00004200| 69 73 20 79 6f 75 72 73 | 22 2c 20 6c 6b 70 2d 3e |is yours|", lkp->|
|00004210| 64 65 76 29 3b 0a 09 69 | 66 20 28 72 65 71 75 65 |dev);..i|f (reque|
|00004220| 73 74 29 20 7b 0a 09 20 | 20 20 20 69 66 20 28 72 |st) {.. | if (r|
|00004230| 65 73 6f 75 72 63 65 29 | 0a 09 09 50 72 69 6e 74 |esource)|...Print|
|00004240| 66 28 22 20 2d 20 22 29 | 3b 0a 09 20 20 20 20 50 |f(" - ")|;.. P|
|00004250| 72 69 6e 74 66 28 22 77 | 61 69 74 69 6e 67 20 66 |rintf("w|aiting f|
|00004260| 6f 72 20 63 6f 6e 66 69 | 72 6d 61 74 69 6f 6e 20 |or confi|rmation |
|00004270| 6f 66 20 72 65 71 75 65 | 73 74 22 29 3b 0a 09 20 |of reque|st");.. |
|00004280| 20 20 20 28 76 6f 69 64 | 29 20 66 66 6c 75 73 68 | (void|) fflush|
|00004290| 28 73 74 64 65 72 72 29 | 3b 0a 09 20 20 20 20 6f |(stderr)|;.. o|
|000042a0| 6d 61 73 6b 20 3d 20 73 | 69 67 62 6c 6f 63 6b 28 |mask = s|igblock(|
|000042b0| 53 49 47 45 4d 54 29 3b | 0a 09 20 20 20 20 28 76 |SIGEMT);|.. (v|
|000042c0| 6f 69 64 29 20 73 69 67 | 6e 61 6c 28 53 49 47 45 |oid) sig|nal(SIGE|
|000042d0| 4d 54 2c 20 66 75 6c 66 | 69 6c 29 3b 0a 09 20 20 |MT, fulf|il);.. |
|000042e0| 20 20 6e 65 65 64 72 65 | 71 75 65 73 74 2b 2b 3b | needre|quest++;|
|000042f0| 20 72 65 71 75 65 73 74 | 65 64 20 3d 20 30 3b 0a | request|ed = 0;.|
|00004300| 09 20 20 20 20 28 76 6f | 69 64 29 20 77 72 69 74 |. (vo|id) writ|
|00004310| 65 28 6c 6f 63 6b 66 69 | 6c 65 2c 20 72 65 71 75 |e(lockfi|le, requ|
|00004320| 65 73 74 2c 20 73 74 72 | 6c 65 6e 28 72 65 71 75 |est, str|len(requ|
|00004330| 65 73 74 29 29 3b 0a 09 | 20 20 20 20 69 66 20 28 |est));..| if (|
|00004340| 72 65 73 6f 75 72 63 65 | 29 0a 09 09 73 79 73 6c |resource|)...sysl|
|00004350| 6f 67 28 4c 4f 47 4c 45 | 56 45 4c 2c 20 22 68 61 |og(LOGLE|VEL, "ha|
|00004360| 76 65 20 25 73 2c 20 6e | 65 65 64 20 25 73 22 2c |ve %s, n|eed %s",|
|00004370| 20 72 65 73 6f 75 72 63 | 65 2c 20 72 65 71 75 65 | resourc|e, reque|
|00004380| 73 74 29 3b 0a 09 20 20 | 20 20 65 6c 73 65 0a 09 |st);.. | else..|
|00004390| 09 73 79 73 6c 6f 67 28 | 4c 4f 47 4c 45 56 45 4c |.syslog(|LOGLEVEL|
|000043a0| 2c 20 22 6e 65 65 64 20 | 25 73 22 2c 20 72 65 71 |, "need |%s", req|
|000043b0| 75 65 73 74 29 3b 0a 09 | 20 20 20 20 73 79 73 6c |uest);..| sysl|
|000043c0| 6f 67 28 4c 4f 47 4c 45 | 56 45 4c 2c 20 22 60 6b |og(LOGLE|VEL, "`k|
|000043d0| 69 6c 6c 20 2d 45 4d 54 | 20 25 64 27 20 6f 72 20 |ill -EMT| %d' or |
|000043e0| 60 6b 69 6c 6c 20 2d 54 | 45 52 4d 20 25 64 27 22 |`kill -T|ERM %d'"|
|000043f0| 2c 0a 09 09 67 65 74 70 | 69 64 28 29 2c 20 67 65 |,...getp|id(), ge|
|00004400| 74 70 69 64 28 29 29 3b | 0a 09 20 20 20 20 64 6f |tpid());|.. do|
|00004410| 20 7b 0a 09 20 20 20 20 | 20 20 20 20 73 69 67 70 | {.. | sigp|
|00004420| 61 75 73 65 28 6f 6d 61 | 73 6b 20 26 20 7e 6d 61 |ause(oma|sk & ~ma|
|00004430| 73 6b 28 53 49 47 45 4d | 54 29 29 3b 0a 09 20 20 |sk(SIGEM|T));.. |
|00004440| 20 20 7d 20 77 68 69 6c | 65 20 28 21 66 75 6c 66 | } whil|e (!fulf|
|00004450| 69 6c 6c 65 64 29 3b 0a | 09 20 20 20 20 28 76 6f |illed);.|. (vo|
|00004460| 69 64 29 20 66 74 72 75 | 6e 63 61 74 65 28 6c 6f |id) ftru|ncate(lo|
|00004470| 63 6b 66 69 6c 65 2c 20 | 73 69 7a 65 6f 66 28 69 |ckfile, |sizeof(i|
|00004480| 6e 74 29 20 2b 20 50 57 | 5f 4e 41 4d 45 4c 29 3b |nt) + PW|_NAMEL);|
|00004490| 0a 09 20 20 20 20 50 72 | 69 6e 74 66 28 22 20 2d |.. Pr|intf(" -|
|000044a0| 20 67 6f 69 6e 67 22 29 | 3b 0a 09 20 20 20 20 73 | going")|;.. s|
|000044b0| 79 73 6c 6f 67 28 4c 4f | 47 4c 45 56 45 4c 2c 20 |yslog(LO|GLEVEL, |
|000044c0| 22 67 6f 69 6e 67 22 29 | 3b 0a 09 7d 0a 09 50 72 |"going")|;..}..Pr|
|000044d0| 69 6e 74 66 28 22 5c 6e | 22 29 3b 0a 0a 09 69 66 |intf("\n|");...if|
|000044e0| 20 28 72 65 73 6f 75 72 | 63 65 29 20 73 68 65 6c | (resour|ce) shel|
|000044f0| 6c 28 29 3b 0a 0a 09 63 | 6c 65 61 6e 75 70 28 30 |l();...c|leanup(0|
|00004500| 29 3b 0a 7d 0a 0a 0a 69 | 6e 74 0a 72 65 61 64 5f |);.}...i|nt.read_|
|00004510| 6c 6f 6b 73 28 6c 66 2c | 20 6c 6b 73 29 0a 63 68 |loks(lf,| lks).ch|
|00004520| 61 72 20 2a 6c 66 3b 0a | 72 65 67 69 73 74 65 72 |ar *lf;.|register|
|00004530| 20 64 65 76 5f 6c 6b 20 | 6c 6b 73 5b 5d 3b 0a 7b | dev_lk |lks[];.{|
|00004540| 0a 20 20 20 20 20 20 20 | 20 72 65 67 69 73 74 65 |. | registe|
|00004550| 72 20 46 49 4c 45 20 2a | 6c 66 70 3b 0a 20 20 20 |r FILE *|lfp;. |
|00004560| 20 20 20 20 20 72 65 67 | 69 73 74 65 72 20 64 65 | reg|ister de|
|00004570| 76 5f 6c 6b 20 2a 64 70 | 3b 0a 20 20 20 20 20 20 |v_lk *dp|;. |
|00004580| 20 20 72 65 67 69 73 74 | 65 72 20 69 6e 74 20 69 | regist|er int i|
|00004590| 3b 0a 20 20 20 20 20 20 | 20 20 69 6e 74 20 6e 3b |;. | int n;|
|000045a0| 0a 20 20 20 20 20 20 20 | 20 63 68 61 72 20 6c 69 |. | char li|
|000045b0| 6e 65 5b 42 55 46 53 49 | 5a 5d 3b 0a 0a 20 20 20 |ne[BUFSI|Z];.. |
|000045c0| 20 20 20 20 20 6c 66 70 | 20 3d 20 66 6f 70 65 6e | lfp| = fopen|
|000045d0| 28 6c 66 2c 20 22 72 22 | 29 3b 0a 20 20 20 20 20 |(lf, "r"|);. |
|000045e0| 20 20 20 69 66 28 6c 66 | 70 20 3d 3d 20 4e 55 4c | if(lf|p == NUL|
|000045f0| 4c 29 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |L). | |
|00004600| 20 20 20 72 65 74 75 72 | 6e 20 2d 31 3b 20 20 20 | retur|n -1; |
|00004610| 20 20 20 2f 2a 65 72 72 | 6f 72 2a 2f 0a 0a 20 20 | /*err|or*/.. |
|00004620| 20 20 20 20 20 20 2f 2a | 6e 6f 77 20 72 65 61 64 | /*|now read|
|00004630| 20 69 6e 20 74 68 65 20 | 65 6e 74 72 69 65 73 2a | in the |entries*|
|00004640| 2f 0a 20 20 20 20 20 20 | 20 20 66 6f 72 28 64 70 |/. | for(dp|
|00004650| 20 3d 20 6c 6b 73 2c 69 | 3d 30 3b 20 69 20 3c 20 | = lks,i|=0; i < |
|00004660| 4e 4c 4f 43 4b 53 20 3b | 64 70 2b 2b 2c 20 69 2b |NLOCKS ;|dp++, i+|
|00004670| 2b 29 7b 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |+){. | |
|00004680| 20 20 20 20 69 66 28 20 | 66 67 65 74 73 28 6c 69 | if( |fgets(li|
|00004690| 6e 65 2c 73 69 7a 65 6f | 66 28 6c 69 6e 65 29 2c |ne,sizeo|f(line),|
|000046a0| 6c 66 70 29 20 3d 3d 20 | 4e 55 4c 4c 29 20 20 20 |lfp) == |NULL) |
|000046b0| 20 20 20 20 2f 2a 20 69 | 66 20 45 4f 46 2a 2f 0a | /* i|f EOF*/.|
|000046c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000046d0| 20 20 20 20 20 20 20 20 | 62 72 65 61 6b 3b 0a 20 | |break;. |
|000046e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000046f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 2f | | /|
|00004700| 2a 72 65 61 64 20 61 74 | 20 6d 6f 73 74 20 32 20 |*read at| most 2 |
|00004710| 2b 20 4d 41 58 50 44 45 | 56 20 65 6e 74 72 69 65 |+ MAXPDE|V entrie|
|00004720| 73 20 66 72 6f 6d 20 6c | 69 6e 65 2a 2f 0a 20 20 |s from l|ine*/. |
|00004730| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6e 20 | | n |
|00004740| 3d 20 73 73 63 61 6e 66 | 28 6c 69 6e 65 2c 22 25 |= sscanf|(line,"%|
|00004750| 73 25 73 25 73 25 73 25 | 73 25 73 25 73 25 73 25 |s%s%s%s%|s%s%s%s%|
|00004760| 73 25 73 25 73 25 73 25 | 73 25 73 25 73 25 73 25 |s%s%s%s%|s%s%s%s%|
|00004770| 73 25 73 22 2c 0a 09 09 | 09 09 64 70 2d 3e 6c 6f |s%s",...|..dp->lo|
|00004780| 6b 2c 20 64 70 2d 3e 64 | 65 76 2c 0a 20 20 20 20 |k, dp->d|ev,. |
|00004790| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 75 62 64 | | subd|
|000047b0| 65 76 28 64 70 2c 30 29 | 2c 73 75 62 64 65 76 28 |ev(dp,0)|,subdev(|
|000047c0| 64 70 2c 31 29 2c 0a 20 | 20 20 20 20 20 20 20 20 |dp,1),. | |
|000047d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000047e0| 20 20 20 20 20 20 20 73 | 75 62 64 65 76 28 64 70 | s|ubdev(dp|
|000047f0| 2c 32 29 2c 73 75 62 64 | 65 76 28 64 70 2c 33 29 |,2),subd|ev(dp,3)|
|00004800| 2c 0a 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |,. | |
|00004810| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004820| 20 20 73 75 62 64 65 76 | 28 64 70 2c 34 29 2c 73 | subdev|(dp,4),s|
|00004830| 75 62 64 65 76 28 64 70 | 2c 35 29 2c 0a 20 20 20 |ubdev(dp|,5),. |
|00004840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 75 62 | | sub|
|00004860| 64 65 76 28 64 70 2c 36 | 29 2c 73 75 62 64 65 76 |dev(dp,6|),subdev|
|00004870| 28 64 70 2c 37 29 2c 0a | 20 20 20 20 20 20 20 20 |(dp,7),.| |
|00004880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004890| 20 20 20 20 20 20 20 20 | 73 75 62 64 65 76 28 64 | |subdev(d|
|000048a0| 70 2c 38 29 2c 73 75 62 | 64 65 76 28 64 70 2c 39 |p,8),sub|dev(dp,9|
|000048b0| 29 2c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |),. | |
|000048c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000048d0| 20 20 20 73 75 62 64 65 | 76 28 64 70 2c 31 30 29 | subde|v(dp,10)|
|000048e0| 2c 73 75 62 64 65 76 28 | 64 70 2c 31 31 29 2c 0a |,subdev(|dp,11),.|
|000048f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004910| 73 75 62 64 65 76 28 64 | 70 2c 31 32 29 2c 73 75 |subdev(d|p,12),su|
|00004920| 62 64 65 76 28 64 70 2c | 31 33 29 2c 0a 20 20 20 |bdev(dp,|13),. |
|00004930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 73 75 62 | | sub|
|00004950| 64 65 76 28 64 70 2c 31 | 34 29 2c 73 75 62 64 65 |dev(dp,1|4),subde|
|00004960| 76 28 64 70 2c 31 35 29 | 29 3b 0a 20 20 20 20 20 |v(dp,15)|);. |
|00004970| 20 20 20 20 20 20 20 20 | 20 20 20 69 66 28 6e 20 | | if(n |
|00004980| 3c 20 33 29 7b 20 20 20 | 20 20 20 2f 2a 69 66 20 |< 3){ | /*if |
|00004990| 6c 69 6e 65 20 77 61 73 | 20 62 61 64 20 66 6f 72 |line was| bad for|
|000049a0| 6d 61 74 20 6f 72 20 62 | 6c 61 6e 6b 20 2e 2e 2e |mat or b|lank ...|
|000049b0| 2a 2f 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |*/. | |
|000049c0| 20 20 20 20 20 20 20 20 | 20 20 20 64 70 2d 2d 3b | | dp--;|
|000049d0| 69 2d 2d 3b 20 20 20 20 | 20 20 20 20 20 20 20 20 |i--; | |
|000049e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000049f0| 20 20 20 2f 2a 74 72 79 | 20 61 67 61 69 6e 2a 2f | /*try| again*/|
|00004a00| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004a10| 20 20 20 20 20 20 20 20 | 20 63 6f 6e 74 69 6e 75 | | continu|
|00004a20| 65 3b 7d 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |e;}. | |
|00004a30| 20 20 20 20 69 66 28 6e | 20 3c 20 4d 41 58 50 44 | if(n| < MAXPD|
|00004a40| 45 56 20 2b 20 32 29 0a | 20 20 20 20 20 20 20 20 |EV + 2).| |
|00004a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004a60| 2a 73 75 62 64 65 76 28 | 64 70 2c 20 6e 20 2d 20 |*subdev(|dp, n - |
|00004a70| 32 29 20 3d 20 27 5c 30 | 27 3b 20 20 20 20 20 20 |2) = '\0|'; |
|00004a80| 20 20 20 20 20 20 20 20 | 2f 2a 6e 6f 20 73 74 72 | |/*no str|
|00004a90| 69 6e 67 2a 2f 0a 09 09 | 64 70 2d 3e 6c 6f 63 6b |ing*/...|dp->lock|
|00004aa0| 65 64 20 3d 20 30 3b 0a | 20 20 20 20 20 20 20 20 |ed = 0;.| |
|00004ab0| 20 20 20 20 20 20 20 20 | 7d 0a 09 28 76 6f 69 64 | |}..(void|
|00004ac0| 29 20 66 63 6c 6f 73 65 | 28 6c 66 70 29 3b 0a 20 |) fclose|(lfp);. |
|00004ad0| 20 20 20 20 20 20 20 72 | 65 74 75 72 6e 20 69 3b | r|eturn i;|
|00004ae0| 20 20 20 20 20 20 20 2f | 2a 27 69 27 20 69 73 20 | /|*'i' is |
|00004af0| 74 68 65 20 23 20 6f 66 | 20 6c 69 6e 65 73 20 72 |the # of| lines r|
|00004b00| 65 61 64 20 73 75 63 63 | 65 73 73 66 75 6c 6c 79 |ead succ|essfully|
|00004b10| 2a 2f 0a 7d 0a 0a 76 6f | 69 64 0a 70 72 69 6e 74 |*/.}..vo|id.print|
|00004b20| 5f 6c 6f 63 6b 73 28 29 | 0a 7b 0a 09 72 65 67 69 |_locks()|.{..regi|
|00004b30| 73 74 65 72 20 64 65 76 | 5f 6c 6b 20 2a 6c 6b 70 |ster dev|_lk *lkp|
|00004b40| 3b 0a 09 69 6e 74 20 6e | 65 6e 74 3b 0a 09 73 74 |;..int n|ent;..st|
|00004b50| 72 75 63 74 20 64 69 72 | 65 63 74 20 2a 2a 64 70 |ruct dir|ect **dp|
|00004b60| 2c 20 2a 2a 6e 61 6d 65 | 73 3b 0a 09 69 6e 74 20 |, **name|s;..int |
|00004b70| 70 69 64 73 28 29 2c 20 | 6e 75 6d 73 6f 72 74 28 |pids(), |numsort(|
|00004b80| 29 3b 0a 0a 09 66 6f 72 | 20 28 6c 6b 70 20 3d 20 |);...for| (lkp = |
|00004b90| 26 6c 6f 63 6b 73 5b 30 | 5d 3b 20 6c 6b 70 20 3c |&locks[0|]; lkp <|
|00004ba0| 20 26 6c 6f 63 6b 73 5b | 6e 6c 6f 63 6b 5d 3b 20 | &locks[|nlock]; |
|00004bb0| 6c 6b 70 2b 2b 29 20 7b | 0a 09 09 70 72 69 6e 74 |lkp++) {|...print|
|00004bc0| 5f 6c 6f 63 6b 28 6c 6b | 70 2d 3e 6c 6f 6b 2c 20 |_lock(lk|p->lok, |
|00004bd0| 6c 6b 70 2d 3e 64 65 76 | 29 3b 0a 09 7d 0a 09 69 |lkp->dev|);..}..i|
|00004be0| 66 20 28 63 68 64 69 72 | 28 4c 4f 43 4b 53 44 49 |f (chdir|(LOCKSDI|
|00004bf0| 52 29 29 20 7b 0a 09 09 | 70 65 72 72 6f 72 28 4c |R)) {...|perror(L|
|00004c00| 4f 43 4b 53 44 49 52 29 | 3b 0a 09 09 72 65 74 75 |OCKSDIR)|;...retu|
|00004c10| 72 6e 3b 0a 09 7d 0a 09 | 69 66 20 28 28 6e 65 6e |rn;..}..|if ((nen|
|00004c20| 74 20 3d 20 73 63 61 6e | 64 69 72 28 22 2e 22 2c |t = scan|dir(".",|
|00004c30| 20 26 6e 61 6d 65 73 2c | 20 70 69 64 73 2c 20 6e | &names,| pids, n|
|00004c40| 75 6d 73 6f 72 74 29 29 | 20 3c 20 30 29 20 7b 0a |umsort))| < 0) {.|
|00004c50| 09 09 70 65 72 72 6f 72 | 28 22 73 63 61 6e 64 69 |..perror|("scandi|
|00004c60| 72 22 29 3b 0a 09 09 72 | 65 74 75 72 6e 3b 0a 09 |r");...r|eturn;..|
|00004c70| 7d 0a 09 66 6f 72 20 28 | 64 70 20 3d 20 26 6e 61 |}..for (|dp = &na|
|00004c80| 6d 65 73 5b 30 5d 3b 20 | 64 70 20 3c 20 26 6e 61 |mes[0]; |dp < &na|
|00004c90| 6d 65 73 5b 6e 65 6e 74 | 5d 3b 20 64 70 2b 2b 29 |mes[nent|]; dp++)|
|00004ca0| 20 7b 0a 09 09 70 72 69 | 6e 74 5f 6c 6f 63 6b 28 | {...pri|nt_lock(|
|00004cb0| 28 2a 64 70 29 2d 3e 64 | 5f 6e 61 6d 65 2c 20 28 |(*dp)->d|_name, (|
|00004cc0| 63 68 61 72 20 2a 29 4e | 55 4c 4c 29 3b 0a 09 7d |char *)N|ULL);..}|
|00004cd0| 0a 7d 0a 0a 70 72 69 6e | 74 5f 6c 6f 63 6b 28 6c |.}..prin|t_lock(l|
|00004ce0| 6f 6b 2c 20 64 65 76 29 | 0a 09 63 68 61 72 20 2a |ok, dev)|..char *|
|00004cf0| 6c 6f 6b 2c 20 2a 64 65 | 76 3b 0a 7b 0a 09 69 6e |lok, *de|v;.{..in|
|00004d00| 74 20 69 2c 20 6c 6f 63 | 6b 66 69 6c 65 2c 20 70 |t i, loc|kfile, p|
|00004d10| 69 64 3b 0a 0a 09 69 66 | 20 28 28 6c 6f 63 6b 66 |id;...if| ((lockf|
|00004d20| 69 6c 65 20 3d 20 6f 70 | 65 6e 28 6c 6f 6b 2c 20 |ile = op|en(lok, |
|00004d30| 4f 5f 52 44 4f 4e 4c 59 | 29 29 20 3c 20 30 29 0a |O_RDONLY|)) < 0).|
|00004d40| 09 09 72 65 74 75 72 6e | 3b 0a 09 69 66 20 28 66 |..return|;..if (f|
|00004d50| 6c 6f 63 6b 28 6c 6f 63 | 6b 66 69 6c 65 2c 20 4c |lock(loc|kfile, L|
|00004d60| 4f 43 4b 5f 53 48 7c 4c | 4f 43 4b 5f 4e 42 29 20 |OCK_SH|L|OCK_NB) |
|00004d70| 3c 20 30 29 20 7b 0a 09 | 09 28 76 6f 69 64 29 20 |< 0) {..|.(void) |
|00004d80| 72 65 61 64 28 6c 6f 63 | 6b 66 69 6c 65 2c 20 28 |read(loc|kfile, (|
|00004d90| 63 68 61 72 20 2a 29 26 | 70 69 64 2c 20 73 69 7a |char *)&|pid, siz|
|00004da0| 65 6f 66 28 69 6e 74 29 | 29 3b 0a 09 09 28 76 6f |eof(int)|);...(vo|
|00004db0| 69 64 29 20 72 65 61 64 | 28 6c 6f 63 6b 66 69 6c |id) read|(lockfil|
|00004dc0| 65 2c 20 62 75 66 2c 20 | 50 57 5f 4e 41 4d 45 4c |e, buf, |PW_NAMEL|
|00004dd0| 29 3b 0a 09 09 62 75 66 | 5b 50 57 5f 4e 41 4d 45 |);...buf|[PW_NAME|
|00004de0| 4c 5d 20 3d 20 27 5c 30 | 27 3b 0a 09 09 69 66 20 |L] = '\0|';...if |
|00004df0| 28 64 65 76 29 0a 09 09 | 09 50 72 69 6e 74 66 28 |(dev)...|.Printf(|
|00004e00| 22 25 73 20 69 6e 20 75 | 73 65 20 62 79 20 22 2c |"%s in u|se by ",|
|00004e10| 20 64 65 76 29 3b 0a 09 | 09 50 72 69 6e 74 66 28 | dev);..|.Printf(|
|00004e20| 22 25 75 20 28 25 73 29 | 22 2c 20 70 69 64 2c 20 |"%u (%s)|", pid, |
|00004e30| 62 75 66 29 3b 0a 09 09 | 69 66 20 28 28 69 20 3d |buf);...|if ((i =|
|00004e40| 20 72 65 61 64 28 6c 6f | 63 6b 66 69 6c 65 2c 20 | read(lo|ckfile, |
|00004e50| 62 75 66 2c 20 42 55 46 | 53 49 5a 29 29 20 3e 20 |buf, BUF|SIZ)) > |
|00004e60| 30 29 20 7b 0a 09 09 09 | 62 75 66 5b 69 5d 20 3d |0) {....|buf[i] =|
|00004e70| 20 27 5c 30 27 3b 0a 09 | 09 09 50 72 69 6e 74 66 | '\0';..|..Printf|
|00004e80| 28 22 3a 20 6e 65 65 64 | 73 20 25 73 22 2c 20 62 |(": need|s %s", b|
|00004e90| 75 66 29 3b 0a 09 09 7d | 0a 09 09 50 72 69 6e 74 |uf);...}|...Print|
|00004ea0| 66 28 22 5c 6e 22 29 3b | 0a 09 7d 0a 09 28 76 6f |f("\n");|..}..(vo|
|00004eb0| 69 64 29 20 63 6c 6f 73 | 65 28 6c 6f 63 6b 66 69 |id) clos|e(lockfi|
|00004ec0| 6c 65 29 3b 0a 7d 0a 0a | 69 6e 74 0a 70 69 64 73 |le);.}..|int.pids|
|00004ed0| 28 64 70 29 0a 09 73 74 | 72 75 63 74 20 64 69 72 |(dp)..st|ruct dir|
|00004ee0| 65 63 74 20 2a 64 70 3b | 0a 7b 0a 09 72 65 67 69 |ect *dp;|.{..regi|
|00004ef0| 73 74 65 72 20 63 68 61 | 72 20 2a 70 20 3d 20 64 |ster cha|r *p = d|
|00004f00| 70 2d 3e 64 5f 6e 61 6d | 65 3b 0a 09 77 68 69 6c |p->d_nam|e;..whil|
|00004f10| 65 20 28 2a 70 29 0a 09 | 09 69 66 20 28 21 69 73 |e (*p)..|.if (!is|
|00004f20| 64 69 67 69 74 28 2a 70 | 2b 2b 29 29 0a 09 09 09 |digit(*p|++))....|
|00004f30| 72 65 74 75 72 6e 28 30 | 29 3b 0a 09 72 65 74 75 |return(0|);..retu|
|00004f40| 72 6e 28 31 29 3b 0a 7d | 0a 0a 69 6e 74 0a 6e 75 |rn(1);.}|..int.nu|
|00004f50| 6d 73 6f 72 74 28 64 31 | 2c 20 64 32 29 0a 09 73 |msort(d1|, d2)..s|
|00004f60| 74 72 75 63 74 20 64 69 | 72 65 63 74 20 2a 2a 64 |truct di|rect **d|
|00004f70| 31 2c 20 2a 2a 64 32 3b | 0a 7b 0a 09 69 6e 74 20 |1, **d2;|.{..int |
|00004f80| 70 31 2c 20 70 32 3b 0a | 0a 09 70 31 20 3d 20 61 |p1, p2;.|..p1 = a|
|00004f90| 74 6f 69 28 28 2a 64 31 | 29 2d 3e 64 5f 6e 61 6d |toi((*d1|)->d_nam|
|00004fa0| 65 29 3b 0a 09 70 32 20 | 3d 20 61 74 6f 69 28 28 |e);..p2 |= atoi((|
|00004fb0| 2a 64 32 29 2d 3e 64 5f | 6e 61 6d 65 29 3b 0a 09 |*d2)->d_|name);..|
|00004fc0| 72 65 74 75 72 6e 20 70 | 31 20 2d 20 70 32 3b 0a |return p|1 - p2;.|
|00004fd0| 7d 0a 0a 73 74 61 74 69 | 63 20 69 6e 74 20 63 68 |}..stati|c int ch|
|00004fe0| 69 6c 64 3b 0a 0a 73 69 | 67 63 6f 6e 74 28 29 0a |ild;..si|gcont().|
|00004ff0| 7b 0a 09 28 76 6f 69 64 | 29 20 6b 69 6c 6c 28 63 |{..(void|) kill(c|
|00005000| 68 69 6c 64 2c 20 53 49 | 47 43 4f 4e 54 29 3b 0a |hild, SI|GCONT);.|
|00005010| 7d 0a 0a 73 68 65 6c 6c | 28 29 0a 7b 0a 09 72 65 |}..shell|().{..re|
|00005020| 67 69 73 74 65 72 20 69 | 3b 0a 09 63 68 61 72 20 |gister i|;..char |
|00005030| 2a 6d 79 73 68 65 6c 6c | 2c 20 2a 73 68 65 6c 6c |*myshell|, *shell|
|00005040| 74 3b 0a 09 75 6e 69 6f | 6e 20 77 61 69 74 20 73 |t;..unio|n wait s|
|00005050| 74 61 74 75 73 3b 0a 09 | 63 68 61 72 20 2a 67 65 |tatus;..|char *ge|
|00005060| 74 65 6e 76 28 29 2c 20 | 2a 72 69 6e 64 65 78 28 |tenv(), |*rindex(|
|00005070| 29 3b 0a 09 69 6e 74 20 | 6f 6d 61 73 6b 3b 0a 0a |);..int |omask;..|
|00005080| 09 69 66 20 28 21 28 6d | 79 73 68 65 6c 6c 20 3d |.if (!(m|yshell =|
|00005090| 20 67 65 74 65 6e 76 28 | 22 53 48 45 4c 4c 22 29 | getenv(|"SHELL")|
|000050a0| 29 29 0a 09 09 6d 79 73 | 68 65 6c 6c 20 3d 20 22 |))...mys|hell = "|
|000050b0| 2f 62 69 6e 2f 73 68 22 | 3b 0a 09 69 66 20 28 73 |/bin/sh"|;..if (s|
|000050c0| 68 65 6c 6c 74 20 3d 20 | 72 69 6e 64 65 78 28 6d |hellt = |rindex(m|
|000050d0| 79 73 68 65 6c 6c 2c 20 | 27 2f 27 29 29 0a 09 09 |yshell, |'/'))...|
|000050e0| 73 68 65 6c 6c 74 2b 2b | 3b 0a 09 65 6c 73 65 0a |shellt++|;..else.|
|000050f0| 09 09 73 68 65 6c 6c 74 | 20 3d 20 6d 79 73 68 65 |..shellt| = myshe|
|00005100| 6c 6c 3b 0a 0a 09 2f 2a | 20 69 67 6e 6f 72 65 20 |ll;.../*| ignore |
|00005110| 6b 65 79 62 6f 61 72 64 | 20 67 65 6e 65 72 61 74 |keyboard| generat|
|00005120| 65 64 20 73 69 67 6e 61 | 6c 73 20 6e 6f 77 20 2d |ed signa|ls now -|
|00005130| 20 63 6f 75 6c 64 20 6d | 61 6e 69 70 75 6c 61 74 | could m|anipulat|
|00005140| 65 20 70 72 6f 63 65 73 | 73 0a 09 20 2a 20 67 72 |e proces|s.. * gr|
|00005150| 6f 75 70 73 20 49 20 73 | 75 70 70 6f 73 65 2c 20 |oups I s|uppose, |
|00005160| 62 75 74 20 49 27 6d 20 | 6c 61 7a 79 0a 09 20 2a |but I'm |lazy.. *|
|00005170| 20 46 69 72 73 74 20 62 | 6c 6f 63 6b 20 74 68 65 | First b|lock the|
|00005180| 6d 20 6f 76 65 72 20 74 | 68 65 20 66 6f 72 6b 0a |m over t|he fork.|
|00005190| 09 20 2a 2f 0a 09 6f 6d | 61 73 6b 20 3d 20 73 69 |. */..om|ask = si|
|000051a0| 67 62 6c 6f 63 6b 28 6d | 61 73 6b 28 53 49 47 49 |gblock(m|ask(SIGI|
|000051b0| 4e 54 29 7c 6d 61 73 6b | 28 53 49 47 51 55 49 54 |NT)|mask|(SIGQUIT|
|000051c0| 29 29 3b 0a 09 28 76 6f | 69 64 29 20 66 66 6c 75 |));..(vo|id) fflu|
|000051d0| 73 68 28 73 74 64 65 72 | 72 29 3b 0a 09 69 66 20 |sh(stder|r);..if |
|000051e0| 28 28 63 68 69 6c 64 20 | 3d 20 76 66 6f 72 6b 28 |((child |= vfork(|
|000051f0| 29 29 20 3d 3d 20 30 29 | 20 7b 0a 09 09 2f 2a 20 |)) == 0)| {.../* |
|00005200| 6e 6f 72 6d 61 6c 20 6b | 65 79 62 6f 61 72 64 20 |normal k|eyboard |
|00005210| 73 69 67 6e 61 6c 73 20 | 69 6e 20 73 68 65 6c 6c |signals |in shell|
|00005220| 20 2a 2f 0a 09 09 28 76 | 6f 69 64 29 20 73 69 67 | */...(v|oid) sig|
|00005230| 73 65 74 6d 61 73 6b 28 | 6f 6d 61 73 6b 29 3b 0a |setmask(|omask);.|
|00005240| 09 09 63 68 69 6c 64 20 | 3d 20 67 65 74 70 69 64 |..child |= getpid|
|00005250| 28 29 3b 0a 09 09 28 76 | 6f 69 64 29 20 73 65 74 |();...(v|oid) set|
|00005260| 75 69 64 28 75 75 69 64 | 29 3b 0a 09 09 28 76 6f |uid(uuid|);...(vo|
|00005270| 69 64 29 20 73 65 74 67 | 69 64 28 75 67 69 64 29 |id) setg|id(ugid)|
|00005280| 3b 0a 09 09 66 6f 72 28 | 69 20 3d 20 67 65 74 64 |;...for(|i = getd|
|00005290| 74 61 62 6c 65 73 69 7a | 65 28 29 3b 20 69 20 3e |tablesiz|e(); i >|
|000052a0| 20 33 3b 20 29 0a 09 09 | 09 28 76 6f 69 64 29 20 | 3; )...|.(void) |
|000052b0| 63 6c 6f 73 65 28 2d 2d | 69 29 3b 0a 09 09 73 68 |close(--|i);...sh|
|000052c0| 65 6c 6c 61 72 67 73 5b | 30 5d 20 3d 20 73 68 65 |ellargs[|0] = she|
|000052d0| 6c 6c 74 3b 0a 09 09 65 | 78 65 63 76 28 6d 79 73 |llt;...e|xecv(mys|
|000052e0| 68 65 6c 6c 2c 20 73 68 | 65 6c 6c 61 72 67 73 29 |hell, sh|ellargs)|
|000052f0| 3b 0a 09 09 50 72 69 6e | 74 66 28 22 25 73 20 3a |;...Prin|tf("%s :|
|00005300| 20 63 6f 75 6c 64 6e 27 | 74 20 65 78 65 63 75 74 | couldn'|t execut|
|00005310| 65 20 25 73 20 3a 20 25 | 73 5c 6e 22 2c 0a 09 09 |e %s : %|s\n",...|
|00005320| 09 70 72 6f 67 6e 61 6d | 65 2c 20 6d 79 73 68 65 |.prognam|e, myshe|
|00005330| 6c 6c 2c 20 73 79 73 5f | 65 72 72 6c 69 73 74 5b |ll, sys_|errlist[|
|00005340| 65 72 72 6e 6f 5d 29 3b | 0a 09 09 5f 65 78 69 74 |errno]);|..._exit|
|00005350| 28 31 29 3b 0a 09 7d 20 | 65 6c 73 65 20 69 66 20 |(1);..} |else if |
|00005360| 28 63 68 69 6c 64 20 3c | 20 30 29 20 7b 0a 09 09 |(child <| 0) {...|
|00005370| 50 72 69 6e 74 66 28 22 | 25 73 20 3a 20 63 6f 75 |Printf("|%s : cou|
|00005380| 6c 64 6e 27 74 20 66 6f | 72 6b 20 3a 20 25 73 5c |ldn't fo|rk : %s\|
|00005390| 6e 22 2c 0a 09 09 09 70 | 72 6f 67 6e 61 6d 65 2c |n",....p|rogname,|
|000053a0| 20 73 79 73 5f 65 72 72 | 6c 69 73 74 5b 65 72 72 | sys_err|list[err|
|000053b0| 6e 6f 5d 29 3b 0a 09 7d | 20 65 6c 73 65 20 7b 0a |no]);..}| else {.|
|000053c0| 09 09 2f 2a 20 69 67 6e | 6f 72 65 20 6b 65 79 62 |../* ign|ore keyb|
|000053d0| 6f 61 72 64 20 73 69 67 | 6e 61 6c 73 20 69 6e 20 |oard sig|nals in |
|000053e0| 70 61 72 65 6e 74 20 2a | 2f 0a 09 09 28 76 6f 69 |parent *|/...(voi|
|000053f0| 64 29 20 73 69 67 6e 61 | 6c 28 53 49 47 49 4e 54 |d) signa|l(SIGINT|
|00005400| 2c 20 53 49 47 5f 49 47 | 4e 29 3b 0a 09 09 28 76 |, SIG_IG|N);...(v|
|00005410| 6f 69 64 29 20 73 69 67 | 6e 61 6c 28 53 49 47 51 |oid) sig|nal(SIGQ|
|00005420| 55 49 54 2c 20 53 49 47 | 5f 49 47 4e 29 3b 0a 09 |UIT, SIG|_IGN);..|
|00005430| 09 28 76 6f 69 64 29 20 | 73 69 67 6e 61 6c 28 53 |.(void) |signal(S|
|00005440| 49 47 43 4f 4e 54 2c 20 | 73 69 67 63 6f 6e 74 29 |IGCONT, |sigcont)|
|00005450| 3b 0a 09 09 28 76 6f 69 | 64 29 20 73 69 67 73 65 |;...(voi|d) sigse|
|00005460| 74 6d 61 73 6b 28 6f 6d | 61 73 6b 29 3b 0a 09 09 |tmask(om|ask);...|
|00005470| 64 6f 20 7b 0a 09 09 09 | 77 68 69 6c 65 28 28 69 |do {....|while((i|
|00005480| 20 3d 20 77 61 69 74 33 | 28 26 73 74 61 74 75 73 | = wait3|(&status|
|00005490| 2c 0a 09 09 09 09 09 57 | 55 4e 54 52 41 43 45 44 |,......W|UNTRACED|
|000054a0| 2c 0a 09 09 09 09 09 28 | 73 74 72 75 63 74 20 72 |,......(|struct r|
|000054b0| 75 73 61 67 65 20 2a 29 | 4e 55 4c 4c 29 29 20 3e |usage *)|NULL)) >|
|000054c0| 20 30 0a 09 09 09 09 26 | 26 20 69 20 21 3d 20 63 | 0.....&|& i != c|
|000054d0| 68 69 6c 64 29 3b 0a 09 | 09 09 69 66 20 28 73 74 |hild);..|..if (st|
|000054e0| 61 74 75 73 2e 77 5f 73 | 74 6f 70 76 61 6c 20 3d |atus.w_s|topval =|
|000054f0| 3d 20 57 53 54 4f 50 50 | 45 44 29 0a 09 09 09 09 |= WSTOPP|ED).....|
|00005500| 28 76 6f 69 64 29 20 6b | 69 6c 6c 28 30 2c 20 28 |(void) k|ill(0, (|
|00005510| 69 6e 74 29 73 74 61 74 | 75 73 2e 77 5f 73 74 6f |int)stat|us.w_sto|
|00005520| 70 73 69 67 29 3b 0a 09 | 09 09 65 6c 73 65 0a 09 |psig);..|..else..|
|00005530| 09 09 09 6e 65 72 72 73 | 20 3d 20 73 74 61 74 75 |...nerrs| = statu|
|00005540| 73 2e 77 5f 72 65 74 63 | 6f 64 65 3b 0a 09 09 7d |s.w_retc|ode;...}|
|00005550| 20 77 68 69 6c 65 20 28 | 73 74 61 74 75 73 2e 77 | while (|status.w|
|00005560| 5f 73 74 6f 70 76 61 6c | 20 3d 3d 20 57 53 54 4f |_stopval| == WSTO|
|00005570| 50 50 45 44 29 3b 0a 09 | 7d 0a 7d 0a 0a 72 65 73 |PPED);..|}.}..res|
|00005580| 74 6f 72 65 28 6c 6b 70 | 29 20 20 20 20 2f 2a 72 |tore(lkp|) /*r|
|00005590| 65 73 74 6f 72 65 73 20 | 6f 77 6e 65 72 73 68 69 |estores |ownershi|
|000055a0| 70 20 61 6e 64 20 70 72 | 6f 74 65 63 74 69 6f 6e |p and pr|otection|
|000055b0| 73 20 66 6f 72 20 72 65 | 73 6f 75 72 63 65 73 20 |s for re|sources |
|000055c0| 75 6e 6c 6f 63 6b 65 64 | 2a 2f 0a 72 65 67 69 73 |unlocked|*/.regis|
|000055d0| 74 65 72 20 64 65 76 5f | 6c 6b 20 2a 6c 6b 70 3b |ter dev_|lk *lkp;|
|000055e0| 0a 7b 0a 20 20 20 20 20 | 20 20 20 72 65 67 69 73 |.{. | regis|
|000055f0| 74 65 72 20 69 6e 74 20 | 70 64 65 76 3b 0a 0a 20 |ter int |pdev;.. |
|00005600| 20 20 20 20 20 20 20 66 | 6f 72 28 70 64 65 76 20 | f|or(pdev |
|00005610| 3d 20 30 3b 70 64 65 76 | 20 3c 20 4d 41 58 50 44 |= 0;pdev| < MAXPD|
|00005620| 45 56 20 26 26 20 28 2a | 73 75 62 64 65 76 28 6c |EV && (*|subdev(l|
|00005630| 6b 70 2c 70 64 65 76 29 | 29 3b 70 64 65 76 2b 2b |kp,pdev)|);pdev++|
|00005640| 29 7b 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |){. | |
|00005650| 20 20 20 28 76 6f 69 64 | 29 20 63 68 6f 77 6e 28 | (void|) chown(|
|00005660| 20 73 75 62 64 65 76 28 | 6c 6b 70 2c 70 64 65 76 | subdev(|lkp,pdev|
|00005670| 29 2c 52 6f 6f 74 75 69 | 64 2c 52 6f 6f 74 67 69 |),Rootui|d,Rootgi|
|00005680| 64 20 29 3b 0a 20 20 20 | 20 20 20 20 20 20 20 20 |d );. | |
|00005690| 20 20 20 20 20 28 76 6f | 69 64 29 20 63 68 6d 6f | (vo|id) chmo|
|000056a0| 64 28 20 73 75 62 64 65 | 76 28 6c 6b 70 2c 70 64 |d( subde|v(lkp,pd|
|000056b0| 65 76 29 2c 4f 57 4e 45 | 52 4f 4e 4c 59 29 3b 0a |ev),OWNE|RONLY);.|
|000056c0| 09 09 7d 0a 7d 0a 0a 2f | 2a 20 56 41 52 41 52 47 |..}.}../|* VARARG|
|000056d0| 53 31 20 2a 2f 0a 50 72 | 69 6e 74 66 28 66 2c 20 |S1 */.Pr|intf(f, |
|000056e0| 61 2c 20 62 2c 20 63 2c | 20 64 29 20 63 68 61 72 |a, b, c,| d) char|
|000056f0| 20 2a 66 3b 0a 7b 0a 09 | 69 66 20 28 21 73 69 6c | *f;.{..|if (!sil|
|00005700| 65 6e 74 29 20 28 76 6f | 69 64 29 20 66 70 72 69 |ent) (vo|id) fpri|
|00005710| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 66 2c 20 61 |ntf(stde|rr, f, a|
|00005720| 2c 20 62 2c 20 63 2c 20 | 64 29 3b 0a 7d 0a 0a 66 |, b, c, |d);.}..f|
|00005730| 75 6c 66 69 6c 28 29 20 | 7b 20 66 75 6c 66 69 6c |ulfil() |{ fulfil|
|00005740| 6c 65 64 20 3d 20 31 3b | 20 7d 0a 0a 63 6c 65 61 |led = 1;| }..clea|
|00005750| 6e 75 70 28 73 69 67 29 | 0a 7b 0a 09 72 65 67 69 |nup(sig)|.{..regi|
|00005760| 73 74 65 72 20 64 65 76 | 5f 6c 6b 20 2a 6c 6b 70 |ster dev|_lk *lkp|
|00005770| 3b 0a 0a 09 2f 2a 20 77 | 61 69 74 20 66 6f 72 20 |;.../* w|ait for |
|00005780| 63 68 69 6c 64 20 74 6f | 20 66 69 6e 69 73 68 20 |child to| finish |
|00005790| 62 65 66 6f 72 65 20 77 | 65 20 67 6f 20 6f 75 72 |before w|e go our|
|000057a0| 73 65 6c 76 65 73 20 2a | 2f 0a 09 69 66 20 28 21 |selves *|/..if (!|
|000057b0| 6e 65 72 72 73 20 7c 7c | 20 73 69 67 29 20 50 72 |nerrs ||| sig) Pr|
|000057c0| 69 6e 74 66 28 22 5c 6e | 22 29 3b 0a 09 69 66 20 |intf("\n|");..if |
|000057d0| 28 73 69 67 29 20 50 72 | 69 6e 74 66 28 22 25 73 |(sig) Pr|intf("%s|
|000057e0| 5c 6e 22 2c 20 73 79 73 | 5f 73 69 67 6c 69 73 74 |\n", sys|_siglist|
|000057f0| 5b 73 69 67 5d 29 3b 0a | 09 69 66 20 28 72 65 71 |[sig]);.|.if (req|
|00005800| 75 65 73 74 65 64 29 20 | 73 79 73 6c 6f 67 28 4c |uested) |syslog(L|
|00005810| 4f 47 4c 45 56 45 4c 2c | 20 22 72 65 71 75 65 73 |OGLEVEL,| "reques|
|00005820| 74 20 77 69 74 68 64 72 | 61 77 6e 22 29 3b 0a 09 |t withdr|awn");..|
|00005830| 69 66 20 28 6e 65 65 64 | 72 65 71 75 65 73 74 29 |if (need|request)|
|00005840| 20 7b 0a 09 09 69 66 20 | 28 73 69 67 29 20 7b 0a | {...if |(sig) {.|
|00005850| 09 09 09 50 72 69 6e 74 | 66 28 22 52 65 71 75 65 |...Print|f("Reque|
|00005860| 73 74 20 64 65 6e 69 65 | 64 5c 6e 22 29 3b 0a 09 |st denie|d\n");..|
|00005870| 09 09 73 79 73 6c 6f 67 | 28 4c 4f 47 4c 45 56 45 |..syslog|(LOGLEVE|
|00005880| 4c 2c 20 22 72 65 71 75 | 65 73 74 20 64 65 6e 69 |L, "requ|est deni|
|00005890| 65 64 22 29 3b 0a 09 09 | 7d 20 65 6c 73 65 20 69 |ed");...|} else i|
|000058a0| 66 20 28 72 65 73 6f 75 | 72 63 65 29 20 7b 0a 09 |f (resou|rce) {..|
|000058b0| 09 09 73 79 73 6c 6f 67 | 28 4c 4f 47 4c 45 56 45 |..syslog|(LOGLEVE|
|000058c0| 4c 2c 20 22 64 6f 6e 65 | 20 77 69 74 68 20 25 73 |L, "done| with %s|
|000058d0| 22 2c 20 72 65 73 6f 75 | 72 63 65 29 3b 0a 09 09 |", resou|rce);...|
|000058e0| 7d 0a 09 7d 0a 09 2f 2a | 20 63 68 65 63 6b 20 69 |}..}../*| check i|
|000058f0| 66 20 74 68 65 72 65 27 | 73 20 61 6e 79 74 68 69 |f there'|s anythi|
|00005900| 6e 67 20 74 6f 20 77 61 | 69 74 20 66 6f 72 20 2a |ng to wa|it for *|
|00005910| 2f 0a 09 69 66 20 28 21 | 77 61 69 74 33 28 28 75 |/..if (!|wait3((u|
|00005920| 6e 69 6f 6e 20 77 61 69 | 74 20 2a 29 4e 55 4c 4c |nion wai|t *)NULL|
|00005930| 2c 20 57 4e 4f 48 41 4e | 47 2c 20 28 73 74 72 75 |, WNOHAN|G, (stru|
|00005940| 63 74 20 72 75 73 61 67 | 65 20 2a 29 4e 55 4c 4c |ct rusag|e *)NULL|
|00005950| 29 29 0a 09 09 50 72 69 | 6e 74 66 28 22 77 61 69 |))...Pri|ntf("wai|
|00005960| 74 69 6e 67 20 66 6f 72 | 20 73 68 65 6c 6c 20 74 |ting for| shell t|
|00005970| 6f 20 65 78 69 74 5c 6e | 22 29 3b 0a 09 28 76 6f |o exit\n|");..(vo|
|00005980| 69 64 29 20 66 66 6c 75 | 73 68 28 73 74 64 65 72 |id) fflu|sh(stder|
|00005990| 72 29 3b 0a 09 77 68 69 | 6c 65 20 28 77 61 69 74 |r);..whi|le (wait|
|000059a0| 28 28 75 6e 69 6f 6e 20 | 77 61 69 74 20 2a 29 4e |((union |wait *)N|
|000059b0| 55 4c 4c 29 20 3e 20 30 | 29 3b 0a 09 66 6f 72 20 |ULL) > 0|);..for |
|000059c0| 28 6c 6b 70 20 3d 20 26 | 6c 6f 63 6b 73 5b 30 5d |(lkp = &|locks[0]|
|000059d0| 3b 20 6c 6b 70 20 3c 20 | 26 6c 6f 63 6b 73 5b 6e |; lkp < |&locks[n|
|000059e0| 6c 6f 63 6b 5d 3b 20 6c | 6b 70 2b 2b 29 0a 09 20 |lock]; l|kp++).. |
|000059f0| 20 20 20 69 66 20 28 6c | 6b 70 2d 3e 6c 6f 63 6b | if (l|kp->lock|
|00005a00| 65 64 29 20 7b 0a 09 09 | 72 65 73 74 6f 72 65 28 |ed) {...|restore(|
|00005a10| 6c 6b 70 29 3b 0a 09 09 | 50 72 69 6e 74 66 28 22 |lkp);...|Printf("|
|00005a20| 25 73 20 72 65 6c 65 61 | 73 65 64 2e 5c 6e 22 2c |%s relea|sed.\n",|
|00005a30| 20 6c 6b 70 2d 3e 64 65 | 76 29 3b 0a 09 20 20 20 | lkp->de|v);.. |
|00005a40| 20 7d 0a 09 69 66 20 28 | 21 72 65 73 6f 75 72 63 | }..if (|!resourc|
|00005a50| 65 29 0a 09 09 28 76 6f | 69 64 29 20 75 6e 6c 69 |e)...(vo|id) unli|
|00005a60| 6e 6b 28 6e 6f 6c 6f 6b | 2e 6c 6f 6b 29 3b 0a 20 |nk(nolok|.lok);. |
|00005a70| 20 20 20 20 20 20 20 65 | 78 69 74 28 73 69 67 20 | e|xit(sig |
|00005a80| 3f 20 2d 31 20 3a 20 6e | 65 72 72 73 29 3b 0a 7d |? -1 : n|errs);.}|
|00005a90| 0a 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005c90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ca0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005e90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+