home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / everex-led / part01 next >
SHell self-extracting ARchive  |  1993-06-20  |  21.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 64 72 75 69 | 64 21 64 61 72 63 79 40 |om: drui|d!darcy@|
|00000030| 75 75 6e 65 74 2e 55 55 | 2e 4e 45 54 20 28 44 27 |uunet.UU|.NET (D'|
|00000040| 41 72 63 79 20 4a 2e 4d | 2e 20 43 61 69 6e 29 0a |Arcy J.M|. Cain).|
|00000050| 53 75 62 6a 65 63 74 3a | 20 76 32 36 69 32 34 31 |Subject:| v26i241|
|00000060| 3a 20 65 76 65 72 65 78 | 2d 6c 65 64 20 2d 20 4c |: everex|-led - L|
|00000070| 45 44 20 64 72 69 76 65 | 72 20 66 6f 72 20 45 76 |ED drive|r for Ev|
|00000080| 65 72 65 78 20 53 74 65 | 70 20 6d 61 63 68 69 6e |erex Ste|p machin|
|00000090| 65 73 2c 20 50 61 72 74 | 30 31 2f 30 31 0a 53 65 |es, Part|01/01.Se|
|000000a0| 6e 64 65 72 3a 20 75 6e | 69 78 2d 73 6f 75 72 63 |nder: un|ix-sourc|
|000000b0| 65 73 2d 6d 6f 64 65 72 | 61 74 6f 72 40 67 77 2e |es-moder|ator@gw.|
|000000c0| 68 6f 6d 65 2e 76 69 78 | 2e 63 6f 6d 0a 41 70 70 |home.vix|.com.App|
|000000d0| 72 6f 76 65 64 3a 20 76 | 69 78 69 65 40 67 77 2e |roved: v|ixie@gw.|
|000000e0| 68 6f 6d 65 2e 76 69 78 | 2e 63 6f 6d 0a 0a 53 75 |home.vix|.com..Su|
|000000f0| 62 6d 69 74 74 65 64 2d | 42 79 3a 20 64 72 75 69 |bmitted-|By: drui|
|00000100| 64 21 64 61 72 63 79 40 | 75 75 6e 65 74 2e 55 55 |d!darcy@|uunet.UU|
|00000110| 2e 4e 45 54 20 28 44 27 | 41 72 63 79 20 4a 2e 4d |.NET (D'|Arcy J.M|
|00000120| 2e 20 43 61 69 6e 29 0a | 50 6f 73 74 69 6e 67 2d |. Cain).|Posting-|
|00000130| 4e 75 6d 62 65 72 3a 20 | 56 6f 6c 75 6d 65 20 32 |Number: |Volume 2|
|00000140| 36 2c 20 49 73 73 75 65 | 20 32 34 31 0a 41 72 63 |6, Issue| 241.Arc|
|00000150| 68 69 76 65 2d 4e 61 6d | 65 3a 20 65 76 65 72 65 |hive-Nam|e: evere|
|00000160| 78 2d 6c 65 64 2f 70 61 | 72 74 30 31 0a 0a 23 21 |x-led/pa|rt01..#!|
|00000170| 20 2f 62 69 6e 2f 73 68 | 0a 23 20 54 68 69 73 20 | /bin/sh|.# This |
|00000180| 69 73 20 61 20 73 68 65 | 6c 6c 20 61 72 63 68 69 |is a she|ll archi|
|00000190| 76 65 2e 20 20 52 65 6d | 6f 76 65 20 61 6e 79 74 |ve. Rem|ove anyt|
|000001a0| 68 69 6e 67 20 62 65 66 | 6f 72 65 20 74 68 69 73 |hing bef|ore this|
|000001b0| 20 6c 69 6e 65 2c 20 74 | 68 65 6e 20 75 6e 70 61 | line, t|hen unpa|
|000001c0| 63 6b 0a 23 20 69 74 20 | 62 79 20 73 61 76 69 6e |ck.# it |by savin|
|000001d0| 67 20 69 74 20 69 6e 74 | 6f 20 61 20 66 69 6c 65 |g it int|o a file|
|000001e0| 20 61 6e 64 20 74 79 70 | 69 6e 67 20 22 73 68 20 | and typ|ing "sh |
|000001f0| 66 69 6c 65 22 2e 20 20 | 54 6f 20 6f 76 65 72 77 |file". |To overw|
|00000200| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 0a 23 20 |rite exi|sting.# |
|00000210| 66 69 6c 65 73 2c 20 74 | 79 70 65 20 22 73 68 20 |files, t|ype "sh |
|00000220| 66 69 6c 65 20 2d 63 22 | 2e 20 20 59 6f 75 20 63 |file -c"|. You c|
|00000230| 61 6e 20 61 6c 73 6f 20 | 66 65 65 64 20 74 68 69 |an also |feed thi|
|00000240| 73 20 61 73 20 73 74 61 | 6e 64 61 72 64 20 69 6e |s as sta|ndard in|
|00000250| 70 75 74 20 76 69 61 0a | 23 20 75 6e 73 68 61 72 |put via.|# unshar|
|00000260| 2c 20 6f 72 20 62 79 20 | 74 79 70 69 6e 67 20 22 |, or by |typing "|
|00000270| 73 68 20 3c 66 69 6c 65 | 22 2c 20 65 2e 67 2e 2e |sh <file|", e.g..|
|00000280| 20 20 49 66 20 74 68 69 | 73 20 61 72 63 68 69 76 | If thi|s archiv|
|00000290| 65 20 69 73 20 63 6f 6d | 70 6c 65 74 65 2c 20 79 |e is com|plete, y|
|000002a0| 6f 75 0a 23 20 77 69 6c | 6c 20 73 65 65 20 74 68 |ou.# wil|l see th|
|000002b0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6d 65 73 73 |e follow|ing mess|
|000002c0| 61 67 65 20 61 74 20 74 | 68 65 20 65 6e 64 3a 0a |age at t|he end:.|
|000002d0| 23 09 09 22 45 6e 64 20 | 6f 66 20 61 72 63 68 69 |#.."End |of archi|
|000002e0| 76 65 20 31 20 28 6f 66 | 20 31 29 2e 22 0a 23 20 |ve 1 (of| 1).".# |
|000002f0| 43 6f 6e 74 65 6e 74 73 | 3a 20 20 4d 41 4e 49 46 |Contents|: MANIF|
|00000300| 45 53 54 20 4d 61 6b 65 | 66 69 6c 65 20 52 45 41 |EST Make|file REA|
|00000310| 44 4d 45 20 6c 65 64 2e | 37 20 6c 65 64 2e 63 20 |DME led.|7 led.c |
|00000320| 6c 65 64 74 69 6d 65 2e | 31 20 6c 65 64 74 69 6d |ledtime.|1 ledtim|
|00000330| 65 2e 63 0a 23 20 57 72 | 61 70 70 65 64 20 62 79 |e.c.# Wr|apped by|
|00000340| 20 76 69 78 69 65 40 67 | 77 2e 68 6f 6d 65 2e 76 | vixie@g|w.home.v|
|00000350| 69 78 2e 63 6f 6d 20 6f | 6e 20 53 75 6e 20 4a 75 |ix.com o|n Sun Ju|
|00000360| 6e 20 32 30 20 31 31 3a | 35 37 3a 30 34 20 31 39 |n 20 11:|57:04 19|
|00000370| 39 33 0a 50 41 54 48 3d | 2f 62 69 6e 3a 2f 75 73 |93.PATH=|/bin:/us|
|00000380| 72 2f 62 69 6e 3a 2f 75 | 73 72 2f 75 63 62 20 3b |r/bin:/u|sr/ucb ;|
|00000390| 20 65 78 70 6f 72 74 20 | 50 41 54 48 0a 69 66 20 | export |PATH.if |
|000003a0| 74 65 73 74 20 2d 66 20 | 27 4d 41 4e 49 46 45 53 |test -f |'MANIFES|
|000003b0| 54 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |T' -a "$|{1}" != |
|000003c0| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|000003d0| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|000003e0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|000003f0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 4d 41 4e 49 |ing file| \"'MANI|
|00000400| 46 45 53 54 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |FEST'\".|else.ech|
|00000410| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00000420| 6e 67 20 5c 22 27 4d 41 | 4e 49 46 45 53 54 27 5c |ng \"'MA|NIFEST'\|
|00000430| 22 20 5c 28 33 33 31 20 | 63 68 61 72 61 63 74 65 |" \(331 |characte|
|00000440| 72 73 5c 29 0a 73 65 64 | 20 22 73 2f 5e 58 2f 2f |rs\).sed| "s/^X//|
|00000450| 22 20 3e 27 4d 41 4e 49 | 46 45 53 54 27 20 3c 3c |" >'MANI|FEST' <<|
|00000460| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 20 |'END_OF_|FILE'.X |
|00000470| 20 20 46 69 6c 65 20 4e | 61 6d 65 09 09 41 72 63 | File N|ame..Arc|
|00000480| 68 69 76 65 20 23 09 44 | 65 73 63 72 69 70 74 69 |hive #.D|escripti|
|00000490| 6f 6e 0a 58 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |on.X----|--------|
|000004a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|000004d0| 58 20 4d 41 4e 49 46 45 | 53 54 20 20 20 20 20 20 |X MANIFE|ST |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 31 09 54 | | 1.T|
|000004f0| 68 69 73 20 73 68 69 70 | 70 69 6e 67 20 6c 69 73 |his ship|ping lis|
|00000500| 74 0a 58 20 4d 61 6b 65 | 66 69 6c 65 20 20 20 20 |t.X Make|file |
|00000510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00000520| 09 0a 58 20 52 45 41 44 | 4d 45 20 20 20 20 20 20 |..X READ|ME |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00000540| 09 0a 58 20 6c 65 64 2e | 37 20 20 20 20 20 20 20 |..X led.|7 |
|00000550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00000560| 09 0a 58 20 6c 65 64 2e | 63 20 20 20 20 20 20 20 |..X led.|c |
|00000570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|00000580| 09 0a 58 20 6c 65 64 74 | 69 6d 65 2e 31 20 20 20 |..X ledt|ime.1 |
|00000590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|000005a0| 09 0a 58 20 6c 65 64 74 | 69 6d 65 2e 63 20 20 20 |..X ledt|ime.c |
|000005b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|000005c0| 09 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |..END_OF|_FILE.if|
|000005d0| 20 74 65 73 74 20 33 33 | 31 20 2d 6e 65 20 60 77 | test 33|1 -ne `w|
|000005e0| 63 20 2d 63 20 3c 27 4d | 41 4e 49 46 45 53 54 27 |c -c <'M|ANIFEST'|
|000005f0| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00000600| 20 73 68 61 72 3a 20 5c | 22 27 4d 41 4e 49 46 45 | shar: \|"'MANIFE|
|00000610| 53 54 27 5c 22 20 75 6e | 70 61 63 6b 65 64 20 77 |ST'\" un|packed w|
|00000620| 69 74 68 20 77 72 6f 6e | 67 20 73 69 7a 65 21 0a |ith wron|g size!.|
|00000630| 66 69 0a 23 20 65 6e 64 | 20 6f 66 20 27 4d 41 4e |fi.# end| of 'MAN|
|00000640| 49 46 45 53 54 27 0a 66 | 69 0a 69 66 20 74 65 73 |IFEST'.f|i.if tes|
|00000650| 74 20 2d 66 20 27 4d 61 | 6b 65 66 69 6c 65 27 20 |t -f 'Ma|kefile' |
|00000660| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00000670| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00000680| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00000690| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|000006a0| 20 66 69 6c 65 20 5c 22 | 27 4d 61 6b 65 66 69 6c | file \"|'Makefil|
|000006b0| 65 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |e'\".els|e.echo s|
|000006c0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|000006d0| 5c 22 27 4d 61 6b 65 66 | 69 6c 65 27 5c 22 20 5c |\"'Makef|ile'\" \|
|000006e0| 28 33 38 35 32 20 63 68 | 61 72 61 63 74 65 72 73 |(3852 ch|aracters|
|000006f0| 5c 29 0a 73 65 64 20 22 | 73 2f 5e 58 2f 2f 22 20 |\).sed "|s/^X//" |
|00000700| 3e 27 4d 61 6b 65 66 69 | 6c 65 27 20 3c 3c 27 45 |>'Makefi|le' <<'E|
|00000710| 4e 44 5f 4f 46 5f 46 49 | 4c 45 27 0a 58 23 20 4d |ND_OF_FI|LE'.X# M|
|00000720| 61 6b 65 66 69 6c 65 20 | 66 6f 72 20 4c 45 44 20 |akefile |for LED |
|00000730| 64 72 69 76 65 72 0a 58 | 23 20 57 72 69 74 74 65 |driver.X|# Writte|
|00000740| 6e 20 62 79 20 44 27 41 | 72 63 79 20 4a 2e 4d 2e |n by D'A|rcy J.M.|
|00000750| 20 43 61 69 6e 0a 58 23 | 20 46 6f 72 20 70 61 63 | Cain.X#| For pac|
|00000760| 6b 61 67 65 20 77 72 69 | 74 74 65 6e 20 62 79 20 |kage wri|tten by |
|00000770| 53 74 65 70 68 65 6e 20 | 4a 2e 20 46 72 69 65 64 |Stephen |J. Fried|
|00000780| 6c 20 61 6e 64 20 44 27 | 41 72 63 79 20 4a 2e 4d |l and D'|Arcy J.M|
|00000790| 2e 20 43 61 69 6e 0a 58 | 0a 58 23 20 4e 6f 74 65 |. Cain.X|.X# Note|
|000007a0| 20 74 68 61 74 20 61 6e | 79 74 68 69 6e 67 20 74 | that an|ything t|
|000007b0| 68 61 74 20 72 75 6e 73 | 20 73 75 20 64 69 73 70 |hat runs| su disp|
|000007c0| 6c 61 79 73 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |lays the| command|
|000007d0| 20 6c 69 6e 65 20 73 6f | 20 74 68 61 74 0a 58 23 | line so| that.X#|
|000007e0| 20 74 68 65 20 62 75 69 | 6c 64 65 72 20 6b 6e 6f | the bui|lder kno|
|000007f0| 77 73 20 77 68 61 74 20 | 68 65 2f 73 68 65 20 69 |ws what |he/she i|
|00000800| 73 20 67 65 74 74 69 6e | 67 20 69 6e 74 6f 2e 0a |s gettin|g into..|
|00000810| 58 0a 58 23 20 43 68 61 | 6e 67 65 20 4c 45 44 5f |X.X# Cha|nge LED_|
|00000820| 49 4e 49 54 5f 53 54 52 | 20 66 6f 72 20 79 6f 75 |INIT_STR| for you|
|00000830| 72 20 74 61 73 74 65 20 | 6f 72 20 72 65 6d 6f 76 |r taste |or remov|
|00000840| 65 20 69 74 20 66 6f 72 | 20 64 65 66 61 75 6c 74 |e it for| default|
|00000850| 20 28 76 65 72 73 69 6f | 6e 20 23 29 0a 58 23 20 | (versio|n #).X# |
|00000860| 44 65 66 69 6e 65 20 43 | 4c 4f 43 4b 31 32 20 74 |Define C|LOCK12 t|
|00000870| 6f 20 68 61 76 65 20 6c | 65 64 74 69 6d 65 20 64 |o have l|edtime d|
|00000880| 69 73 70 6c 61 79 20 74 | 69 6d 65 20 69 6e 20 31 |isplay t|ime in 1|
|00000890| 32 20 68 6f 75 72 20 66 | 6f 72 6d 61 74 0a 58 43 |2 hour f|ormat.XC|
|000008a0| 46 4c 41 47 53 09 3d 20 | 2d 4f 20 2d 58 61 20 2d |FLAGS.= |-O -Xa -|
|000008b0| 76 20 2d 44 43 4c 4f 43 | 4b 31 32 20 2d 44 4c 45 |v -DCLOC|K12 -DLE|
|000008c0| 44 5f 49 4e 49 54 5f 53 | 54 52 3d 5c 22 60 75 6e |D_INIT_S|TR=\"`un|
|000008d0| 61 6d 65 20 2d 6e 60 5c | 22 0a 58 0a 58 23 20 49 |ame -n`\|".X.X# I|
|000008e0| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 77 61 6e 74 |f you do|n't want|
|000008f0| 20 74 6f 20 72 75 6e 20 | 6c 65 64 74 69 6d 65 20 | to run |ledtime |
|00000900| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 63 68 |automati|cally ch|
|00000910| 61 6e 67 65 20 22 72 65 | 73 70 61 77 6e 22 20 69 |ange "re|spawn" i|
|00000920| 6e 0a 58 23 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 |n.X# the| followi|
|00000930| 6e 67 20 64 65 66 69 6e | 69 74 69 6f 6e 20 74 6f |ng defin|ition to|
|00000940| 20 22 6f 66 66 22 0a 58 | 52 45 53 50 41 57 4e 20 | "off".X|RESPAWN |
|00000950| 3d 09 72 65 73 70 61 77 | 6e 0a 58 0a 58 23 20 49 |=.respaw|n.X.X# I|
|00000960| 66 20 79 6f 75 20 77 61 | 6e 74 20 74 6f 20 62 75 |f you wa|nt to bu|
|00000970| 69 6c 64 20 61 6e 64 20 | 69 6e 73 74 61 6c 6c 20 |ild and |install |
|00000980| 61 6c 6c 20 74 68 65 20 | 66 69 6c 65 73 20 62 75 |all the |files bu|
|00000990| 74 20 6e 6f 74 20 61 63 | 74 69 76 61 74 65 0a 58 |t not ac|tivate.X|
|000009a0| 23 20 74 68 65 20 64 72 | 69 76 65 72 20 74 68 65 |# the dr|iver the|
|000009b0| 6e 20 63 68 61 6e 67 65 | 20 74 68 65 20 27 59 27 |n change| the 'Y'|
|000009c0| 20 68 65 72 65 20 74 6f | 20 27 4e 27 2e 0a 58 41 | here to| 'N'..XA|
|000009d0| 43 54 49 56 45 20 3d 09 | 59 0a 58 0a 58 23 20 6d |CTIVE =.|Y.X.X# m|
|000009e0| 6f 64 69 66 79 20 74 68 | 65 73 65 20 69 66 20 74 |odify th|ese if t|
|000009f0| 68 69 6e 67 73 20 61 72 | 65 20 6b 65 70 74 20 73 |hings ar|e kept s|
|00000a00| 6f 6d 65 77 68 65 72 65 | 20 65 6c 73 65 20 6f 6e |omewhere| else on|
|00000a10| 20 79 6f 75 72 20 73 79 | 73 74 65 6d 0a 58 42 49 | your sy|stem.XBI|
|00000a20| 4e 20 3d 09 09 2f 75 73 | 72 2f 6c 6f 63 61 6c 2f |N =../us|r/local/|
|00000a30| 62 69 6e 0a 58 4d 41 4e | 20 3d 09 09 2f 75 73 72 |bin.XMAN| =../usr|
|00000a40| 2f 73 68 61 72 65 2f 6d | 61 6e 2f 6d 61 6e 0a 58 |/share/m|an/man.X|
|00000a50| 43 4f 4e 46 42 49 4e 20 | 3d 09 2f 65 74 63 2f 63 |CONFBIN |=./etc/c|
|00000a60| 6f 6e 66 2f 62 69 6e 0a | 58 49 4e 43 4c 55 44 45 |onf/bin.|XINCLUDE|
|00000a70| 20 3d 09 2f 75 73 72 2f | 69 6e 63 6c 75 64 65 2f | =./usr/|include/|
|00000a80| 73 79 73 0a 58 0a 58 23 | 20 59 6f 75 20 73 68 6f |sys.X.X#| You sho|
|00000a90| 75 6c 64 6e 27 74 20 68 | 61 76 65 20 74 6f 20 63 |uldn't h|ave to c|
|00000aa0| 68 61 6e 67 65 20 61 6e | 79 74 68 69 6e 67 20 61 |hange an|ything a|
|00000ab0| 66 74 65 72 20 74 68 69 | 73 20 28 77 69 74 68 20 |fter thi|s (with |
|00000ac0| 74 68 65 20 70 6f 73 73 | 69 62 6c 65 0a 58 23 20 |the poss|ible.X# |
|00000ad0| 65 78 63 65 70 74 69 6f | 6e 20 6f 66 20 4e 6f 64 |exceptio|n of Nod|
|00000ae0| 65 2c 20 73 65 65 20 63 | 6f 6d 6d 65 6e 74 73 20 |e, see c|omments |
|00000af0| 62 65 6c 6f 77 2e 29 20 | 20 49 66 20 79 6f 75 20 |below.) | If you |
|00000b00| 64 6f 20 66 69 6e 64 20 | 63 68 61 6e 67 65 73 0a |do find |changes.|
|00000b10| 58 23 20 6e 65 63 65 73 | 73 61 72 79 20 49 20 77 |X# neces|sary I w|
|00000b20| 6f 75 6c 64 20 61 70 70 | 72 65 63 69 61 74 65 20 |ould app|reciate |
|00000b30| 61 20 6d 65 73 73 61 67 | 65 20 61 74 20 64 61 72 |a messag|e at dar|
|00000b40| 63 79 40 64 72 75 69 64 | 2e 55 55 43 50 2e 20 20 |cy@druid|.UUCP. |
|00000b50| 49 6e 0a 58 23 20 66 61 | 63 74 20 70 6c 65 61 73 |In.X# fa|ct pleas|
|00000b60| 65 20 74 65 6c 6c 20 6d | 65 20 77 68 65 6e 20 79 |e tell m|e when y|
|00000b70| 6f 75 20 68 61 76 65 20 | 74 6f 20 6d 61 6b 65 20 |ou have |to make |
|00000b80| 61 6e 79 20 63 68 61 6e | 67 65 73 20 74 6f 20 74 |any chan|ges to t|
|00000b90| 68 65 20 70 61 63 6b 61 | 67 65 0a 58 23 20 6f 74 |he packa|ge.X# ot|
|00000ba0| 68 65 72 20 74 68 61 6e | 20 61 62 6f 76 65 2e 0a |her than| above..|
|00000bb0| 58 0a 58 53 55 5f 49 4e | 53 54 41 4c 4c 20 3d 09 |X.XSU_IN|STALL =.|
|00000bc0| 22 69 66 20 24 28 43 4f | 4e 46 42 49 4e 29 2f 69 |"if $(CO|NFBIN)/i|
|00000bd0| 64 63 68 65 63 6b 20 2d | 70 20 6c 65 64 3b 5c 0a |dcheck -|p led;\.|
|00000be0| 58 09 09 09 09 74 68 65 | 6e 20 24 28 43 4f 4e 46 |X....the|n $(CONF|
|00000bf0| 42 49 4e 29 2f 69 64 69 | 6e 73 74 61 6c 6c 20 2d |BIN)/idi|nstall -|
|00000c00| 6b 20 2d 61 20 6c 65 64 | 3b 5c 0a 58 09 09 09 09 |k -a led|;\.X....|
|00000c10| 65 6c 73 65 20 24 28 43 | 4f 4e 46 42 49 4e 29 2f |else $(C|ONFBIN)/|
|00000c20| 69 64 69 6e 73 74 61 6c | 6c 20 2d 6b 20 2d 75 20 |idinstal|l -k -u |
|00000c30| 6c 65 64 3b 5c 0a 58 09 | 09 09 09 66 69 22 0a 58 |led;\.X.|...fi".X|
|00000c40| 53 55 5f 55 4e 49 4e 53 | 54 41 4c 4c 20 3d 09 22 |SU_UNINS|TALL =."|
|00000c50| 24 28 43 4f 4e 46 42 49 | 4e 29 2f 69 64 69 6e 73 |$(CONFBI|N)/idins|
|00000c60| 74 61 6c 6c 20 2d 6b 20 | 2d 64 20 6c 65 64 3b 20 |tall -k |-d led; |
|00000c70| 24 28 43 4f 4e 46 42 49 | 4e 29 2f 69 64 62 75 69 |$(CONFBI|N)/idbui|
|00000c80| 6c 64 22 0a 58 53 55 5f | 42 55 49 4c 44 20 3d 09 |ld".XSU_|BUILD =.|
|00000c90| 09 22 24 28 43 4f 4e 46 | 42 49 4e 29 2f 69 64 62 |."$(CONF|BIN)/idb|
|00000ca0| 75 69 6c 64 22 0a 58 0a | 58 53 59 53 46 49 4c 45 |uild".X.|XSYSFILE|
|00000cb0| 53 20 3d 09 49 6e 69 74 | 20 4d 61 73 74 65 72 20 |S =.Init| Master |
|00000cc0| 4e 61 6d 65 20 4e 6f 64 | 65 20 53 79 73 74 65 6d |Name Nod|e System|
|00000cd0| 0a 58 2e 53 49 4c 45 4e | 54 3a 0a 58 0a 58 61 6c |.X.SILEN|T:.X.Xal|
|00000ce0| 6c 3a 09 44 72 69 76 65 | 72 2e 6f 20 6c 65 64 74 |l:.Drive|r.o ledt|
|00000cf0| 69 6d 65 0a 58 0a 58 49 | 6e 69 74 3a 09 4d 61 6b |ime.X.XI|nit:.Mak|
|00000d00| 65 66 69 6c 65 0a 58 09 | 65 63 68 6f 20 22 43 72 |efile.X.|echo "Cr|
|00000d10| 65 61 74 69 6e 67 20 49 | 6e 69 74 22 0a 58 09 65 |eating I|nit".X.e|
|00000d20| 63 68 6f 20 22 6c 65 64 | 30 3a 32 33 3a 24 28 52 |cho "led|0:23:$(R|
|00000d30| 45 53 50 41 57 4e 29 3a | 6e 69 63 65 20 2d 31 30 |ESPAWN):|nice -10|
|00000d40| 30 20 24 28 42 49 4e 29 | 2f 6c 65 64 74 69 6d 65 |0 $(BIN)|/ledtime|
|00000d50| 22 20 3e 20 49 6e 69 74 | 0a 58 0a 58 4d 61 73 74 |" > Init|.X.XMast|
|00000d60| 65 72 3a 09 09 4d 61 6b | 65 66 69 6c 65 0a 58 09 |er:..Mak|efile.X.|
|00000d70| 65 63 68 6f 20 22 43 72 | 65 61 74 69 6e 67 20 4d |echo "Cr|eating M|
|00000d80| 61 73 74 65 72 22 0a 58 | 09 65 63 68 6f 20 22 6c |aster".X|.echo "l|
|00000d90| 65 64 09 6f 63 77 69 49 | 09 69 63 6f 48 09 6c 65 |ed.ocwiI|.icoH.le|
|00000da0| 64 09 30 09 30 09 31 09 | 34 09 2d 31 22 20 3e 20 |d.0.0.1.|4.-1" > |
|00000db0| 4d 61 73 74 65 72 0a 58 | 0a 58 4e 61 6d 65 3a 09 |Master.X|.XName:.|
|00000dc0| 09 4d 61 6b 65 66 69 6c | 65 0a 58 09 65 63 68 6f |.Makefil|e.X.echo|
|00000dd0| 20 22 43 72 65 61 74 69 | 6e 67 20 4e 61 6d 65 22 | "Creati|ng Name"|
|00000de0| 0a 58 09 65 63 68 6f 20 | 22 4c 45 44 20 64 72 69 |.X.echo |"LED dri|
|00000df0| 76 65 72 22 20 3e 20 4e | 61 6d 65 0a 58 0a 58 23 |ver" > N|ame.X.X#|
|00000e00| 20 49 66 20 79 6f 75 20 | 63 68 61 6e 67 65 20 74 | If you |change t|
|00000e10| 68 65 20 6e 75 6d 62 65 | 72 20 6f 66 20 6d 69 6e |he numbe|r of min|
|00000e20| 6f 72 20 64 65 76 69 63 | 65 73 20 79 6f 75 20 73 |or devic|es you s|
|00000e30| 68 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 0a 58 |hould pr|obably.X|
|00000e40| 23 20 6d 61 6b 65 20 73 | 6f 6d 65 20 63 68 61 6e |# make s|ome chan|
|00000e50| 67 65 73 20 68 65 72 65 | 20 62 75 74 20 74 68 69 |ges here| but thi|
|00000e60| 73 20 73 65 65 6d 73 20 | 75 6e 6c 69 6b 65 6c 79 |s seems |unlikely|
|00000e70| 2e 20 20 49 27 6d 20 73 | 75 72 65 20 74 68 61 74 |. I'm s|ure that|
|00000e80| 0a 58 23 20 66 6f 75 72 | 20 64 65 76 69 63 65 73 |.X# four| devices|
|00000e90| 20 6f 6e 20 61 20 73 69 | 6e 67 6c 65 20 38 20 63 | on a si|ngle 8 c|
|00000ea0| 68 61 72 61 63 74 65 72 | 20 64 69 73 70 6c 61 79 |haracter| display|
|00000eb0| 20 69 73 20 6f 76 65 72 | 6b 69 6c 6c 20 61 6c 72 | is over|kill alr|
|00000ec0| 65 61 64 79 0a 58 4e 6f | 64 65 3a 09 09 4d 61 6b |eady.XNo|de:..Mak|
|00000ed0| 65 66 69 6c 65 0a 58 09 | 65 63 68 6f 20 22 43 72 |efile.X.|echo "Cr|
|00000ee0| 65 61 74 69 6e 67 20 4e | 6f 64 65 22 0a 58 09 65 |eating N|ode".X.e|
|00000ef0| 63 68 6f 20 22 6c 65 64 | 09 6c 65 64 63 6c 6f 63 |cho "led|.ledcloc|
|00000f00| 6b 09 63 09 30 22 20 3e | 20 4e 6f 64 65 0a 58 09 |k.c.0" >| Node.X.|
|00000f10| 65 63 68 6f 20 22 6c 65 | 64 09 6c 65 64 31 09 09 |echo "le|d.led1..|
|00000f20| 63 09 31 22 20 3e 3e 20 | 4e 6f 64 65 0a 58 09 65 |c.1" >> |Node.X.e|
|00000f30| 63 68 6f 20 22 6c 65 64 | 09 6c 65 64 32 09 09 63 |cho "led|.led2..c|
|00000f40| 09 32 22 20 3e 3e 20 4e | 6f 64 65 0a 58 09 65 63 |.2" >> N|ode.X.ec|
|00000f50| 68 6f 20 22 6c 65 64 09 | 6c 65 64 09 09 09 63 09 |ho "led.|led...c.|
|00000f60| 33 22 20 3e 3e 20 4e 6f | 64 65 0a 58 0a 58 53 79 |3" >> No|de.X.XSy|
|00000f70| 73 74 65 6d 3a 09 09 4d | 61 6b 65 66 69 6c 65 0a |stem:..M|akefile.|
|00000f80| 58 09 65 63 68 6f 20 22 | 43 72 65 61 74 69 6e 67 |X.echo "|Creating|
|00000f90| 20 53 79 73 74 65 6d 22 | 0a 58 09 65 63 68 6f 20 | System"|.X.echo |
|00000fa0| 22 6c 65 64 09 24 28 41 | 43 54 49 56 45 29 09 31 |"led.$(A|CTIVE).1|
|00000fb0| 09 30 09 30 09 30 09 30 | 09 30 09 30 09 30 22 20 |.0.0.0.0|.0.0.0" |
|00000fc0| 3e 20 53 79 73 74 65 6d | 0a 58 0a 58 63 6c 65 61 |> System|.X.Xclea|
|00000fd0| 6e 3a 0a 58 09 72 6d 20 | 2d 66 20 6c 65 64 74 69 |n:.X.rm |-f ledti|
|00000fe0| 6d 65 20 2a 2e 6f 20 63 | 6f 72 65 20 24 28 53 59 |me *.o c|ore $(SY|
|00000ff0| 53 46 49 4c 45 53 29 20 | 69 6e 73 74 61 6c 6c 20 |SFILES) |install |
|00001000| 62 75 69 6c 64 20 6c 65 | 64 2e 73 68 61 72 0a 58 |build le|d.shar.X|
|00001010| 0a 58 44 72 69 76 65 72 | 2e 6f 3a 20 6c 65 64 2e |.XDriver|.o: led.|
|00001020| 63 0a 58 09 65 63 68 6f | 20 22 43 72 65 61 74 69 |c.X.echo| "Creati|
|00001030| 6e 67 20 44 72 69 76 65 | 72 2e 6f 20 66 72 6f 6d |ng Drive|r.o from|
|00001040| 20 6c 65 64 2e 63 22 0a | 58 09 24 28 43 43 29 20 | led.c".|X.$(CC) |
|00001050| 2d 63 20 24 28 43 46 4c | 41 47 53 29 20 6c 65 64 |-c $(CFL|AGS) led|
|00001060| 2e 63 0a 58 09 6d 76 20 | 6c 65 64 2e 6f 20 44 72 |.c.X.mv |led.o Dr|
|00001070| 69 76 65 72 2e 6f 0a 58 | 0a 58 69 6e 73 74 61 6c |iver.o.X|.Xinstal|
|00001080| 6c 3a 09 44 72 69 76 65 | 72 2e 6f 20 6c 65 64 74 |l:.Drive|r.o ledt|
|00001090| 69 6d 65 20 24 28 53 59 | 53 46 49 4c 45 53 29 0a |ime $(SY|SFILES).|
|000010a0| 58 09 65 63 68 6f 20 22 | 49 6e 73 74 61 6c 6c 69 |X.echo "|Installi|
|000010b0| 6e 67 20 70 61 63 6b 61 | 67 65 20 66 69 6c 65 73 |ng packa|ge files|
|000010c0| 22 0a 58 09 72 6d 20 2d | 66 20 24 28 42 49 4e 29 |".X.rm -|f $(BIN)|
|000010d0| 2f 6c 65 64 74 69 6d 65 | 0a 58 09 63 70 20 6c 65 |/ledtime|.X.cp le|
|000010e0| 64 74 69 6d 65 20 24 28 | 42 49 4e 29 0a 58 09 63 |dtime $(|BIN).X.c|
|000010f0| 68 6d 6f 64 20 37 31 31 | 20 24 28 42 49 4e 29 2f |hmod 711| $(BIN)/|
|00001100| 6c 65 64 74 69 6d 65 0a | 58 09 63 70 20 6c 65 64 |ledtime.|X.cp led|
|00001110| 2e 37 20 24 28 4d 41 4e | 29 37 0a 58 09 63 70 20 |.7 $(MAN|)7.X.cp |
|00001120| 6c 65 64 74 69 6d 65 2e | 31 20 24 28 4d 41 4e 29 |ledtime.|1 $(MAN)|
|00001130| 31 0a 58 09 63 68 6d 6f | 64 20 36 34 34 20 24 28 |1.X.chmo|d 644 $(|
|00001140| 4d 41 4e 29 37 2f 6c 65 | 64 2e 37 20 24 28 4d 41 |MAN)7/le|d.7 $(MA|
|00001150| 4e 29 31 2f 6c 65 64 74 | 69 6d 65 2e 31 0a 58 09 |N)1/ledt|ime.1.X.|
|00001160| 65 63 68 6f 20 22 49 66 | 20 6c 65 64 74 69 6d 65 |echo "If| ledtime|
|00001170| 20 69 73 20 61 6c 72 65 | 61 64 79 20 72 75 6e 6e | is alre|ady runn|
|00001180| 69 6e 67 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 6b |ing you |should k|
|00001190| 69 6c 6c 20 69 74 20 69 | 6e 20 6f 72 64 65 72 22 |ill it i|n order"|
|000011a0| 0a 58 09 65 63 68 6f 20 | 22 74 6f 20 6c 65 74 20 |.X.echo |"to let |
|000011b0| 69 6e 69 74 20 72 65 73 | 74 61 72 74 20 77 69 74 |init res|tart wit|
|000011c0| 68 20 74 68 65 20 6e 65 | 77 20 62 69 6e 61 72 79 |h the ne|w binary|
|000011d0| 2e 22 0a 58 09 65 63 68 | 6f 20 22 49 20 6e 65 65 |.".X.ech|o "I nee|
|000011e0| 64 20 74 68 65 20 72 6f | 6f 74 20 70 61 73 73 77 |d the ro|ot passw|
|000011f0| 6f 72 64 20 74 6f 20 72 | 75 6e 20 74 68 65 20 66 |ord to r|un the f|
|00001200| 6f 6c 6c 6f 77 69 6e 67 | 20 63 6f 6d 6d 61 6e 64 |ollowing| command|
|00001210| 22 0a 58 09 65 63 68 6f | 20 24 28 53 55 5f 49 4e |".X.echo| $(SU_IN|
|00001220| 53 54 41 4c 4c 29 0a 58 | 09 73 75 20 72 6f 6f 74 |STALL).X|.su root|
|00001230| 20 2d 63 20 24 28 53 55 | 5f 49 4e 53 54 41 4c 4c | -c $(SU|_INSTALL|
|00001240| 29 0a 58 09 74 6f 75 63 | 68 20 69 6e 73 74 61 6c |).X.touc|h instal|
|00001250| 6c 0a 58 0a 58 75 6e 69 | 6e 73 74 61 6c 6c 3a 0a |l.X.Xuni|nstall:.|
|00001260| 58 09 65 63 68 6f 20 22 | 52 65 6d 6f 76 69 6e 67 |X.echo "|Removing|
|00001270| 20 4c 45 44 20 64 72 69 | 76 65 72 22 0a 58 09 65 | LED dri|ver".X.e|
|00001280| 63 68 6f 20 22 49 20 6e | 65 65 64 20 74 68 65 20 |cho "I n|eed the |
|00001290| 72 6f 6f 74 20 70 61 73 | 73 77 6f 72 64 20 74 6f |root pas|sword to|
|000012a0| 20 72 75 6e 20 74 68 65 | 20 66 6f 6c 6c 6f 77 69 | run the| followi|
|000012b0| 6e 67 20 63 6f 6d 6d 61 | 6e 64 22 0a 58 09 65 63 |ng comma|nd".X.ec|
|000012c0| 68 6f 20 24 28 53 55 5f | 55 4e 49 4e 53 54 41 4c |ho $(SU_|UNINSTAL|
|000012d0| 4c 29 0a 58 09 73 75 20 | 72 6f 6f 74 20 2d 63 20 |L).X.su |root -c |
|000012e0| 24 28 53 55 5f 55 4e 49 | 4e 53 54 41 4c 4c 29 0a |$(SU_UNI|NSTALL).|
|000012f0| 58 09 72 6d 20 2d 66 20 | 24 28 42 49 4e 29 2f 6c |X.rm -f |$(BIN)/l|
|00001300| 65 64 74 69 6d 65 20 24 | 28 4d 41 4e 29 37 2f 6c |edtime $|(MAN)7/l|
|00001310| 65 64 2e 37 20 24 28 4d | 41 4e 29 31 2f 6c 65 64 |ed.7 $(M|AN)1/led|
|00001320| 74 69 6d 65 2e 31 0a 58 | 09 72 6d 20 2d 66 20 69 |time.1.X|.rm -f i|
|00001330| 6e 73 74 61 6c 6c 0a 58 | 0a 58 62 75 69 6c 64 3a |nstall.X|.Xbuild:|
|00001340| 09 69 6e 73 74 61 6c 6c | 0a 58 09 65 63 68 6f 20 |.install|.X.echo |
|00001350| 22 52 65 62 75 69 6c 64 | 69 6e 67 20 6b 65 72 6e |"Rebuild|ing kern|
|00001360| 65 6c 22 0a 58 09 65 63 | 68 6f 20 22 49 20 6e 65 |el".X.ec|ho "I ne|
|00001370| 65 64 20 74 68 65 20 72 | 6f 6f 74 20 70 61 73 73 |ed the r|oot pass|
|00001380| 77 6f 72 64 20 74 6f 20 | 72 75 6e 20 74 68 65 20 |word to |run the |
|00001390| 66 6f 6c 6c 6f 77 69 6e | 67 20 63 6f 6d 6d 61 6e |followin|g comman|
|000013a0| 64 22 0a 58 09 65 63 68 | 6f 20 24 28 53 55 5f 42 |d".X.ech|o $(SU_B|
|000013b0| 55 49 4c 44 29 0a 58 09 | 73 75 20 72 6f 6f 74 20 |UILD).X.|su root |
|000013c0| 2d 63 20 24 28 43 4f 4e | 46 42 49 4e 29 2f 69 64 |-c $(CON|FBIN)/id|
|000013d0| 62 75 69 6c 64 0a 58 09 | 74 6f 75 63 68 20 62 75 |build.X.|touch bu|
|000013e0| 69 6c 64 0a 58 0a 58 73 | 68 61 72 3a 09 6c 65 64 |ild.X.Xs|har:.led|
|000013f0| 2e 73 68 61 72 0a 58 0a | 58 6c 65 64 2e 73 68 61 |.shar.X.|Xled.sha|
|00001400| 72 3a 09 52 65 61 64 6d | 65 20 4d 61 6b 65 66 69 |r:.Readm|e Makefi|
|00001410| 6c 65 20 6c 65 64 2e 37 | 20 6c 65 64 74 69 6d 65 |le led.7| ledtime|
|00001420| 2e 31 20 6c 65 64 2e 63 | 20 6c 65 64 74 69 6d 65 |.1 led.c| ledtime|
|00001430| 2e 63 0a 58 09 73 68 61 | 72 20 2d 76 78 66 20 24 |.c.X.sha|r -vxf $|
|00001440| 5e 20 3e 20 6c 65 64 2e | 73 68 61 72 0a 58 0a 58 |^ > led.|shar.X.X|
|00001450| 77 68 61 74 3a 0a 58 09 | 63 6c 65 61 72 0a 58 09 |what:.X.|clear.X.|
|00001460| 65 63 68 6f 20 22 54 68 | 65 20 66 6f 6c 6c 6f 77 |echo "Th|e follow|
|00001470| 69 6e 67 20 6f 70 74 69 | 6f 6e 73 20 61 72 65 20 |ing opti|ons are |
|00001480| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 20 74 68 69 |availabl|e in thi|
|00001490| 73 20 6d 61 6b 65 66 69 | 6c 65 5c 6e 22 0a 58 09 |s makefi|le\n".X.|
|000014a0| 65 63 68 6f 20 22 61 6c | 6c 3a 20 20 20 20 20 20 |echo "al|l: |
|000014b0| 20 54 68 69 73 20 69 73 | 20 74 68 65 20 64 65 66 | This is| the def|
|000014c0| 61 75 6c 74 2e 20 20 49 | 74 20 6d 61 6b 65 73 20 |ault. I|t makes |
|000014d0| 74 68 65 20 64 72 69 76 | 65 72 2c 20 74 68 65 20 |the driv|er, the |
|000014e0| 63 6f 6e 66 69 67 22 0a | 58 09 65 63 68 6f 20 22 |config".|X.echo "|
|000014f0| 20 20 20 20 20 20 20 20 | 20 20 20 66 69 6c 65 73 | | files|
|00001500| 20 61 6e 64 20 74 68 65 | 20 75 73 65 72 20 70 72 | and the| user pr|
|00001510| 6f 67 72 61 6d 73 2e 20 | 20 52 6f 6f 74 20 70 61 |ograms. | Root pa|
|00001520| 73 73 77 6f 72 64 20 69 | 73 20 6e 6f 74 22 0a 58 |ssword i|s not".X|
|00001530| 09 65 63 68 6f 20 22 20 | 20 20 20 20 20 20 20 20 |.echo " | |
|00001540| 20 20 72 65 71 75 69 72 | 65 64 20 66 6f 72 20 74 | requir|ed for t|
|00001550| 68 69 73 20 6f 70 74 69 | 6f 6e 5c 6e 22 0a 58 09 |his opti|on\n".X.|
|00001560| 65 63 68 6f 20 22 73 68 | 61 72 3a 20 20 20 20 20 |echo "sh|ar: |
|00001570| 20 42 75 69 6c 64 73 20 | 74 68 65 20 73 68 61 72 | Builds |the shar|
|00001580| 20 64 69 73 74 72 69 62 | 75 74 69 6f 6e 20 66 69 | distrib|ution fi|
|00001590| 6c 65 5c 6e 22 0a 58 09 | 65 63 68 6f 20 22 69 6e |le\n".X.|echo "in|
|000015a0| 73 74 61 6c 6c 3a 20 20 | 20 49 6e 73 74 61 6c 6c |stall: | Install|
|000015b0| 73 20 74 68 65 20 64 72 | 69 76 65 72 20 2d 20 72 |s the dr|iver - r|
|000015c0| 6f 6f 74 20 70 61 73 73 | 77 6f 72 64 20 72 65 71 |oot pass|word req|
|000015d0| 75 69 72 65 64 5c 6e 22 | 0a 58 09 65 63 68 6f 20 |uired\n"|.X.echo |
|000015e0| 22 62 75 69 6c 64 3a 20 | 20 20 20 20 49 6e 73 74 |"build: | Inst|
|000015f0| 61 6c 6c 73 20 61 6e 64 | 20 62 75 69 6c 64 73 20 |alls and| builds |
|00001600| 74 68 65 20 64 72 69 76 | 65 72 20 2d 20 72 6f 6f |the driv|er - roo|
|00001610| 74 20 70 61 73 73 77 6f | 72 64 20 72 65 71 75 69 |t passwo|rd requi|
|00001620| 72 65 64 5c 6e 22 0a 58 | 09 65 63 68 6f 20 22 75 |red\n".X|.echo "u|
|00001630| 6e 69 6e 73 74 61 6c 6c | 3a 20 52 65 6d 6f 76 65 |ninstall|: Remove|
|00001640| 73 20 74 68 65 20 64 72 | 69 76 65 72 20 2d 20 72 |s the dr|iver - r|
|00001650| 6f 6f 74 20 70 61 73 73 | 77 6f 72 64 20 72 65 71 |oot pass|word req|
|00001660| 75 69 72 65 64 5c 6e 22 | 0a 58 09 65 63 68 6f 20 |uired\n"|.X.echo |
|00001670| 22 63 6c 65 61 6e 3a 20 | 20 20 20 20 52 65 6d 6f |"clean: | Remo|
|00001680| 76 65 73 20 66 69 6c 65 | 73 20 62 75 69 6c 74 20 |ves file|s built |
|00001690| 66 72 6f 6d 20 64 69 73 | 74 72 69 62 75 74 69 6f |from dis|tributio|
|000016a0| 6e 22 0a 45 4e 44 5f 4f | 46 5f 46 49 4c 45 0a 69 |n".END_O|F_FILE.i|
|000016b0| 66 20 74 65 73 74 20 33 | 38 35 32 20 2d 6e 65 20 |f test 3|852 -ne |
|000016c0| 60 77 63 20 2d 63 20 3c | 27 4d 61 6b 65 66 69 6c |`wc -c <|'Makefil|
|000016d0| 65 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |e'`; the|n. ec|
|000016e0| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 4d 61 6b 65 |ho shar:| \"'Make|
|000016f0| 66 69 6c 65 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |file'\" |unpacked|
|00001700| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00001710| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 4d |!.fi.# e|nd of 'M|
|00001720| 61 6b 65 66 69 6c 65 27 | 0a 66 69 0a 69 66 20 74 |akefile'|.fi.if t|
|00001730| 65 73 74 20 2d 66 20 27 | 52 45 41 44 4d 45 27 20 |est -f '|README' |
|00001740| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00001750| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00001760| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00001770| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00001780| 20 66 69 6c 65 20 5c 22 | 27 52 45 41 44 4d 45 27 | file \"|'README'|
|00001790| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|000017a0| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|000017b0| 27 52 45 41 44 4d 45 27 | 5c 22 20 5c 28 31 32 39 |'README'|\" \(129|
|000017c0| 30 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |0 charac|ters\).s|
|000017d0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 52 45 |ed "s/^X|//" >'RE|
|000017e0| 41 44 4d 45 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ADME' <<|'END_OF_|
|000017f0| 46 49 4c 45 27 0a 58 54 | 68 69 73 20 64 72 69 76 |FILE'.XT|his driv|
|00001800| 65 72 20 69 73 20 62 61 | 73 65 64 20 6f 6e 20 74 |er is ba|sed on t|
|00001810| 68 65 20 64 72 69 76 65 | 72 20 77 72 69 74 74 65 |he drive|r writte|
|00001820| 6e 20 62 79 20 53 74 65 | 70 68 65 6e 20 4a 2e 20 |n by Ste|phen J. |
|00001830| 46 72 69 65 64 6c 0a 58 | 28 66 72 69 65 64 6c 40 |Friedl.X|(friedl@|
|00001840| 6d 74 6e 64 65 77 2e 54 | 75 73 74 69 6e 2e 43 41 |mtndew.T|ustin.CA|
|00001850| 2e 55 53 29 2e 20 20 49 | 20 68 61 76 65 20 6d 61 |.US). I| have ma|
|00001860| 64 65 20 61 20 66 65 77 | 20 6d 6f 64 69 66 69 63 |de a few| modific|
|00001870| 61 74 69 6f 6e 73 3a 0a | 58 0a 58 20 20 2d 20 54 |ations:.|X.X - T|
|00001880| 68 65 20 4d 61 6b 65 66 | 69 6c 65 20 68 61 73 20 |he Makef|ile has |
|00001890| 62 65 65 6e 20 63 6f 6d | 70 6c 65 74 65 6c 79 20 |been com|pletely |
|000018a0| 72 65 76 61 6d 70 65 64 | 2e 20 20 4d 61 6e 79 20 |revamped|. Many |
|000018b0| 73 6d 61 6c 6c 20 66 69 | 6c 65 73 0a 58 20 20 20 |small fi|les.X |
|000018c0| 20 61 72 65 20 6e 6f 77 | 20 63 72 65 61 74 65 64 | are now| created|
|000018d0| 20 64 69 72 65 63 74 6c | 79 20 72 61 74 68 65 72 | directl|y rather|
|000018e0| 20 74 68 61 6e 20 62 65 | 69 6e 67 20 70 61 72 74 | than be|ing part|
|000018f0| 20 6f 66 20 74 68 65 20 | 73 68 61 72 0a 58 20 20 | of the |shar.X |
|00001900| 20 20 64 69 73 74 72 69 | 62 75 74 69 6f 6e 2e 20 | distri|bution. |
|00001910| 20 54 79 70 65 20 27 6d | 61 6b 65 20 77 68 61 74 | Type 'm|ake what|
|00001920| 27 20 66 6f 72 20 61 20 | 6c 69 73 74 20 6f 66 20 |' for a |list of |
|00001930| 74 68 65 20 6d 6f 72 65 | 0a 58 20 20 20 20 69 6d |the more|.X im|
|00001940| 70 6f 72 74 61 6e 74 20 | 6d 61 6b 65 20 6f 70 74 |portant |make opt|
|00001950| 69 6f 6e 73 2e 0a 58 0a | 58 20 20 2d 20 41 6c 6c |ions..X.|X - All|
|00001960| 20 63 6f 64 65 20 69 73 | 20 66 75 6c 6c 79 20 41 | code is| fully A|
|00001970| 4e 53 49 20 63 6f 6d 70 | 6c 69 61 6e 74 2e 0a 58 |NSI comp|liant..X|
|00001980| 0a 58 20 20 2d 20 54 68 | 65 20 64 72 69 76 65 72 |.X - Th|e driver|
|00001990| 20 73 75 70 70 6f 72 74 | 73 20 6d 75 6c 74 69 70 | support|s multip|
|000019a0| 6c 65 20 64 65 76 69 63 | 65 73 20 77 69 74 68 20 |le devic|es with |
|000019b0| 64 65 76 69 63 65 20 6d | 69 6e 6f 72 20 6e 75 6d |device m|inor num|
|000019c0| 62 65 72 73 0a 58 20 20 | 20 20 63 6f 72 72 65 73 |bers.X | corres|
|000019d0| 70 6f 6e 64 69 6e 67 20 | 74 6f 20 70 72 69 6f 72 |ponding |to prior|
|000019e0| 69 74 79 20 6f 6e 20 74 | 68 65 20 4c 45 44 20 64 |ity on t|he LED d|
|000019f0| 69 73 70 6c 61 79 2e 0a | 58 0a 58 20 20 2d 20 54 |isplay..|X.X - T|
|00001a00| 68 65 20 77 72 69 74 65 | 20 66 75 6e 63 74 69 6f |he write| functio|
|00001a10| 6e 20 74 61 6b 65 73 20 | 61 20 72 65 67 75 6c 61 |n takes |a regula|
|00001a20| 72 20 73 74 72 65 61 6d | 20 6f 66 20 63 68 61 72 |r stream| of char|
|00001a30| 61 63 74 65 72 73 20 61 | 6e 64 0a 58 20 20 20 20 |acters a|nd.X |
|00001a40| 64 69 73 70 6c 61 79 73 | 20 74 68 65 6d 20 69 6e |displays| them in|
|00001a50| 20 73 63 72 6f 6c 6c 69 | 6e 67 20 66 61 73 68 69 | scrolli|ng fashi|
|00001a60| 6f 6e 2e 20 20 41 6e 20 | 69 6f 63 74 6c 20 70 65 |on. An |ioctl pe|
|00001a70| 72 66 6f 72 6d 73 20 74 | 68 65 0a 58 20 20 20 20 |rforms t|he.X |
|00001a80| 66 75 6e 63 74 69 6f 6e | 20 70 65 72 66 6f 72 6d |function| perform|
|00001a90| 65 64 20 62 79 20 74 68 | 65 20 6f 72 69 67 69 6e |ed by th|e origin|
|00001aa0| 61 6c 20 77 72 69 74 65 | 20 66 75 6e 63 74 69 6f |al write| functio|
|00001ab0| 6e 2e 0a 58 0a 58 20 20 | 2d 20 54 68 65 20 6c 65 |n..X.X |- The le|
|00001ac0| 64 74 69 6d 65 20 70 72 | 6f 67 72 61 6d 20 68 61 |dtime pr|ogram ha|
|00001ad0| 73 20 62 65 65 6e 20 6d | 6f 64 69 66 69 65 64 20 |s been m|odified |
|00001ae0| 74 6f 20 75 73 65 20 74 | 68 65 20 69 6f 63 74 6c |to use t|he ioctl|
|00001af0| 20 73 6f 20 74 68 61 74 | 0a 58 20 20 20 20 74 68 | so that|.X th|
|00001b00| 65 20 64 69 73 70 6c 61 | 79 20 6f 66 20 74 69 6d |e displa|y of tim|
|00001b10| 65 20 64 6f 65 73 6e 27 | 74 20 63 68 61 73 65 20 |e doesn'|t chase |
|00001b20| 61 63 72 6f 73 73 20 74 | 68 65 20 4c 45 44 73 2e |across t|he LEDs.|
|00001b30| 20 20 41 20 6d 61 6b 65 | 66 69 6c 65 0a 58 20 20 | A make|file.X |
|00001b40| 20 20 6f 70 74 69 6f 6e | 20 61 6c 6c 6f 77 73 20 | option| allows |
|00001b50| 79 6f 75 20 74 6f 20 73 | 65 6c 65 63 74 20 31 32 |you to s|elect 12|
|00001b60| 20 6f 72 20 32 34 20 68 | 6f 75 72 20 74 69 6d 65 | or 24 h|our time|
|00001b70| 20 73 74 79 6c 65 73 2e | 0a 58 0a 58 20 20 2d 20 | styles.|.X.X - |
|00001b80| 54 68 65 20 6c 65 64 74 | 69 6d 65 20 66 75 6e 63 |The ledt|ime func|
|00001b90| 74 69 6f 6e 20 75 73 65 | 73 20 2f 64 65 76 2f 6c |tion use|s /dev/l|
|00001ba0| 65 64 63 6c 6f 63 6b 20 | 77 68 69 63 68 20 69 73 |edclock |which is|
|00001bb0| 20 6d 69 6e 6f 72 20 30 | 2e 20 20 54 68 69 73 0a | minor 0|. This.|
|00001bc0| 58 20 20 20 20 61 6c 6c | 6f 77 73 20 6f 74 68 65 |X all|ows othe|
|00001bd0| 72 20 70 72 6f 67 72 61 | 6d 73 20 74 6f 20 74 65 |r progra|ms to te|
|00001be0| 6d 70 6f 72 61 72 69 6c | 79 20 75 73 65 20 74 68 |mporaril|y use th|
|00001bf0| 65 20 4c 45 44 73 20 77 | 69 74 68 6f 75 74 0a 58 |e LEDs w|ithout.X|
|00001c00| 20 20 20 20 68 61 76 69 | 6e 67 20 74 6f 20 73 74 | havi|ng to st|
|00001c10| 6f 70 20 61 6e 64 20 72 | 65 73 74 61 72 74 20 74 |op and r|estart t|
|00001c20| 68 65 20 63 6c 6f 63 6b | 20 64 69 73 70 6c 61 79 |he clock| display|
|00001c30| 2e 0a 58 0a 58 4e 6f 74 | 65 20 74 68 61 74 20 69 |..X.XNot|e that i|
|00001c40| 66 20 79 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |f you do| not hav|
|00001c50| 65 20 61 6e 20 41 4e 53 | 49 20 63 6f 6d 70 69 6c |e an ANS|I compil|
|00001c60| 65 72 20 79 6f 75 20 77 | 69 6c 6c 20 68 61 76 65 |er you w|ill have|
|00001c70| 20 74 6f 20 72 75 6e 0a | 58 74 68 69 73 20 74 68 | to run.|Xthis th|
|00001c80| 72 6f 75 67 68 20 75 6e | 70 72 6f 74 6f 20 6f 72 |rough un|proto or|
|00001c90| 20 63 68 61 6e 67 65 20 | 69 74 20 62 79 20 68 61 | change |it by ha|
|00001ca0| 6e 64 2e 20 20 49 20 68 | 61 76 65 20 61 74 74 65 |nd. I h|ave atte|
|00001cb0| 6d 70 74 65 64 20 74 6f | 20 63 61 73 74 0a 58 65 |mpted to| cast.Xe|
|00001cc0| 76 65 72 74 68 69 6e 67 | 20 74 68 61 74 20 6d 61 |verthing| that ma|
|00001cd0| 79 20 63 61 75 73 65 20 | 70 72 6f 62 6c 65 6d 73 |y cause |problems|
|00001ce0| 20 64 75 65 20 74 6f 20 | 61 6e 79 20 73 75 63 68 | due to |any such|
|00001cf0| 20 63 68 61 6e 67 65 2e | 0a 58 0a 58 44 27 41 72 | change.|.X.XD'Ar|
|00001d00| 63 79 20 4a 2e 4d 2e 20 | 43 61 69 6e 0a 58 64 61 |cy J.M. |Cain.Xda|
|00001d10| 72 63 79 40 64 72 75 69 | 64 2e 55 55 43 50 0a 45 |rcy@drui|d.UUCP.E|
|00001d20| 4e 44 5f 4f 46 5f 46 49 | 4c 45 0a 69 66 20 74 65 |ND_OF_FI|LE.if te|
|00001d30| 73 74 20 31 32 39 30 20 | 2d 6e 65 20 60 77 63 20 |st 1290 |-ne `wc |
|00001d40| 2d 63 20 3c 27 52 45 41 | 44 4d 45 27 60 3b 20 74 |-c <'REA|DME'`; t|
|00001d50| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00001d60| 72 3a 20 5c 22 27 52 45 | 41 44 4d 45 27 5c 22 20 |r: \"'RE|ADME'\" |
|00001d70| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|00001d80| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|00001d90| 6e 64 20 6f 66 20 27 52 | 45 41 44 4d 45 27 0a 66 |nd of 'R|EADME'.f|
|00001da0| 69 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 6c 65 |i.if tes|t -f 'le|
|00001db0| 64 2e 37 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |d.7' -a |"${1}" !|
|00001dc0| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00001dd0| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00001de0| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00001df0| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 6c 65 |sting fi|le \"'le|
|00001e00| 64 2e 37 27 5c 22 0a 65 | 6c 73 65 0a 65 63 68 6f |d.7'\".e|lse.echo|
|00001e10| 20 73 68 61 72 3a 20 45 | 78 74 72 61 63 74 69 6e | shar: E|xtractin|
|00001e20| 67 20 5c 22 27 6c 65 64 | 2e 37 27 5c 22 20 5c 28 |g \"'led|.7'\" \(|
|00001e30| 31 39 37 39 20 63 68 61 | 72 61 63 74 65 72 73 5c |1979 cha|racters\|
|00001e40| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00001e50| 27 6c 65 64 2e 37 27 20 | 3c 3c 27 45 4e 44 5f 4f |'led.7' |<<'END_O|
|00001e60| 46 5f 46 49 4c 45 27 0a | 58 2e 54 48 20 4c 45 44 |F_FILE'.|X.TH LED|
|00001e70| 20 37 0a 58 2e 64 65 20 | 49 0a 58 5c 66 49 24 30 | 7.X.de |I.X\fI$0|
|00001e80| 5c 66 52 0a 58 2e 2e 0a | 58 2e 53 48 20 4e 41 4d |\fR.X...|X.SH NAM|
|00001e90| 45 0a 58 6c 65 64 20 2d | 20 4c 45 44 20 64 72 69 |E.Xled -| LED dri|
|00001ea0| 76 65 72 20 66 6f 72 20 | 45 76 65 72 65 78 20 66 |ver for |Everex f|
|00001eb0| 72 6f 6e 74 20 70 61 6e | 65 6c 0a 58 2e 53 48 20 |ront pan|el.X.SH |
|00001ec0| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 58 54 68 69 |DESCRIPT|ION.XThi|
|00001ed0| 73 20 69 73 20 61 20 64 | 72 69 76 65 72 20 66 6f |s is a d|river fo|
|00001ee0| 72 20 74 68 65 20 66 72 | 6f 6e 74 2d 70 61 6e 65 |r the fr|ont-pane|
|00001ef0| 6c 20 4c 45 44 73 20 6f | 6e 20 61 6e 20 45 76 65 |l LEDs o|n an Eve|
|00001f00| 72 65 78 0a 58 53 54 45 | 50 20 73 79 73 74 65 6d |rex.XSTE|P system|
|00001f10| 2e 20 20 54 68 69 73 20 | 69 73 20 61 6e 20 65 69 |. This |is an ei|
|00001f20| 67 68 74 2d 63 68 61 72 | 61 63 74 65 72 20 64 69 |ght-char|acter di|
|00001f30| 73 70 6c 61 79 2c 20 61 | 6e 64 20 69 73 0a 58 6e |splay, a|nd is.Xn|
|00001f40| 6f 72 6d 61 6c 6c 79 20 | 64 72 69 76 65 6e 20 62 |ormally |driven b|
|00001f50| 79 20 74 68 65 20 42 49 | 4f 53 20 74 6f 20 73 68 |y the BI|OS to sh|
|00001f60| 6f 77 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 64 |ow the c|urrent d|
|00001f70| 72 69 76 65 2c 0a 58 63 | 79 6c 69 6e 64 65 72 2c |rive,.Xc|ylinder,|
|00001f80| 20 61 6e 64 20 68 65 61 | 64 20 62 65 69 6e 67 20 | and hea|d being |
|00001f90| 61 63 63 65 73 73 65 64 | 2e 20 20 55 4e 49 58 20 |accessed|. UNIX |
|00001fa0| 62 79 70 61 73 73 65 73 | 20 74 68 65 20 42 49 4f |bypasses| the BIO|
|00001fb0| 53 0a 58 65 6e 74 69 72 | 65 6c 79 2c 20 73 6f 20 |S.Xentir|ely, so |
|00001fc0| 69 74 20 66 72 65 65 7a | 65 73 20 73 68 6f 72 74 |it freez|es short|
|00001fd0| 6c 79 20 61 66 74 65 72 | 20 62 6f 6f 74 75 70 2e |ly after| bootup.|
|00001fe0| 0a 58 2e 50 50 0a 58 54 | 68 69 73 20 69 73 20 61 |.X.PP.XT|his is a|
|00001ff0| 20 73 69 6d 70 6c 65 20 | 64 72 69 76 65 72 20 77 | simple |driver w|
|00002000| 68 69 63 68 20 64 69 73 | 70 6c 61 79 73 20 61 20 |hich dis|plays a |
|00002010| 73 69 67 6e 6f 6e 20 6d | 65 73 73 61 67 65 20 74 |signon m|essage t|
|00002020| 68 65 6e 20 61 63 63 65 | 70 74 73 0a 58 63 61 6c |hen acce|pts.Xcal|
|00002030| 6c 73 20 74 6f 20 77 72 | 69 74 65 20 74 6f 20 74 |ls to wr|ite to t|
|00002040| 68 65 20 4c 45 44 73 2e | 20 20 4e 6f 72 6d 61 6c |he LEDs.| Normal|
|00002050| 20 77 72 69 74 65 73 20 | 63 61 75 73 65 20 74 68 | writes |cause th|
|00002060| 65 20 74 65 78 74 20 74 | 6f 20 73 63 72 6f 6c 6c |e text t|o scroll|
|00002070| 0a 58 61 63 72 6f 73 73 | 20 74 68 65 20 64 69 73 |.Xacross| the dis|
|00002080| 70 6c 61 79 2e 0a 58 2e | 50 50 0a 58 54 68 65 72 |play..X.|PP.XTher|
|00002090| 65 20 69 73 20 61 6c 73 | 6f 20 61 6e 20 69 6f 63 |e is als|o an ioc|
|000020a0| 74 6c 20 63 61 6c 6c 20 | 73 75 70 70 6f 72 74 65 |tl call |supporte|
|000020b0| 64 2e 20 20 46 75 6e 63 | 74 69 6f 6e 20 30 20 72 |d. Func|tion 0 r|
|000020c0| 65 2d 64 69 73 70 6c 61 | 79 73 20 74 68 65 0a 58 |e-displa|ys the.X|
|000020d0| 73 69 67 6e 6f 6e 20 6d | 65 73 73 61 67 65 20 61 |signon m|essage a|
|000020e0| 6e 64 20 66 75 6e 63 74 | 69 6f 6e 20 31 20 64 69 |nd funct|ion 1 di|
|000020f0| 73 70 6c 61 79 73 20 74 | 68 65 20 73 74 72 69 6e |splays t|he strin|
|00002100| 67 20 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 |g pointe|d to by |
|00002110| 74 68 65 0a 58 74 68 69 | 72 64 20 61 72 67 75 6d |the.Xthi|rd argum|
|00002120| 65 6e 74 2c 20 70 61 64 | 64 69 6e 67 20 74 6f 20 |ent, pad|ding to |
|00002130| 61 6e 64 20 74 72 75 6e | 63 61 74 69 6e 67 20 61 |and trun|cating a|
|00002140| 74 20 38 20 63 68 61 72 | 61 63 74 65 72 73 20 61 |t 8 char|acters a|
|00002150| 73 20 6e 65 63 65 73 73 | 61 72 79 2e 0a 58 2e 50 |s necess|ary..X.P|
|00002160| 50 0a 58 4d 6f 72 65 20 | 74 68 61 6e 20 6f 6e 65 |P.XMore |than one|
|00002170| 20 64 65 76 69 63 65 20 | 69 73 20 73 75 70 70 6f | device |is suppo|
|00002180| 72 74 65 64 20 69 6e 20 | 74 68 69 73 20 64 72 69 |rted in |this dri|
|00002190| 76 65 72 20 61 6e 64 20 | 74 68 65 20 64 65 66 61 |ver and |the defa|
|000021a0| 75 6c 74 0a 58 63 6f 6e | 66 69 67 75 72 61 74 69 |ult.Xcon|figurati|
|000021b0| 6f 6e 20 73 65 74 73 20 | 75 70 20 66 6f 75 72 2e |on sets |up four.|
|000021c0| 20 20 45 61 63 68 20 64 | 65 76 69 63 65 20 6d 61 | Each d|evice ma|
|000021d0| 79 20 6f 6e 6c 79 20 62 | 65 20 6f 70 65 6e 65 64 |y only b|e opened|
|000021e0| 20 62 79 0a 58 6f 6e 65 | 20 70 72 6f 63 65 73 73 | by.Xone| process|
|000021f0| 20 61 74 20 61 20 74 69 | 6d 65 2e 20 20 57 68 65 | at a ti|me. Whe|
|00002200| 6e 20 6d 6f 72 65 20 74 | 68 61 6e 20 6f 6e 65 20 |n more t|han one |
|00002210| 64 65 76 69 63 65 20 69 | 73 20 6f 70 65 6e 65 64 |device i|s opened|
|00002220| 20 61 74 0a 58 74 68 65 | 20 73 61 6d 65 20 74 69 | at.Xthe| same ti|
|00002230| 6d 65 20 74 68 65 20 6f | 6e 65 73 20 77 69 74 68 |me the o|nes with|
|00002240| 20 74 68 65 20 6c 6f 77 | 65 72 20 6d 69 6e 6f 72 | the low|er minor|
|00002250| 20 6e 75 6d 62 65 72 20 | 61 72 65 20 62 6c 6f 63 | number |are bloc|
|00002260| 6b 65 64 0a 58 75 6e 74 | 69 6c 20 74 68 65 79 20 |ked.Xunt|il they |
|00002270| 62 65 63 6f 6d 65 20 74 | 68 65 20 68 69 67 68 65 |become t|he highe|
|00002280| 73 74 2e 20 20 54 68 69 | 73 20 61 6c 6c 6f 77 73 |st. Thi|s allows|
|00002290| 20 73 6f 6d 65 74 68 69 | 6e 67 20 6c 69 6b 65 20 | somethi|ng like |
|000022a0| 61 0a 58 63 6c 6f 63 6b | 2c 20 66 6f 72 20 65 78 |a.Xclock|, for ex|
|000022b0| 61 6d 70 6c 65 2c 20 74 | 6f 20 63 6f 6e 74 69 6e |ample, t|o contin|
|000022c0| 75 6f 75 73 6c 79 20 64 | 69 73 70 6c 61 79 20 74 |uously d|isplay t|
|000022d0| 68 65 20 74 69 6d 65 20 | 62 75 74 20 73 74 69 6c |he time |but stil|
|000022e0| 6c 0a 58 61 6c 6c 6f 77 | 20 6f 74 68 65 72 20 70 |l.Xallow| other p|
|000022f0| 72 6f 63 65 73 73 65 73 | 20 74 6f 20 74 61 6b 65 |rocesses| to take|
|00002300| 20 6f 76 65 72 20 74 68 | 65 20 64 69 73 70 6c 61 | over th|e displa|
|00002310| 79 20 6f 6e 20 61 20 74 | 65 6d 70 6f 72 61 72 79 |y on a t|emporary|
|00002320| 0a 58 62 61 73 69 73 2e | 20 20 57 68 65 6e 20 74 |.Xbasis.| When t|
|00002330| 68 65 20 73 65 63 6f 6e | 64 20 70 72 6f 63 65 73 |he secon|d proces|
|00002340| 73 20 69 73 20 66 69 6e | 69 73 68 65 64 20 77 69 |s is fin|ished wi|
|00002350| 74 68 20 74 68 65 20 64 | 65 76 69 63 65 0a 58 74 |th the d|evice.Xt|
|00002360| 68 65 20 63 6c 6f 63 6b | 20 64 69 73 70 6c 61 79 |he clock| display|
|00002370| 20 77 69 6c 6c 20 72 65 | 73 75 6d 65 2e 0a 58 2e | will re|sume..X.|
|00002380| 50 50 0a 58 54 68 69 73 | 20 64 72 69 76 65 72 20 |PP.XThis| driver |
|00002390| 68 61 73 20 62 65 65 6e | 20 74 65 73 74 65 64 20 |has been| tested |
|000023a0| 6f 6e 20 61 6e 20 45 76 | 65 72 65 78 20 53 54 45 |on an Ev|erex STE|
|000023b0| 50 2f 32 35 20 72 75 6e | 6e 69 6e 67 0a 58 45 53 |P/25 run|ning.XES|
|000023c0| 49 58 20 35 2e 34 2e 30 | 2e 34 20 62 65 74 61 2e |IX 5.4.0|.4 beta.|
|000023d0| 20 20 49 6e 66 6f 72 6d | 61 74 69 6f 6e 20 61 62 | Inform|ation ab|
|000023e0| 6f 75 74 20 74 68 65 0a | 58 75 73 61 67 65 20 6f |out the.|Xusage o|
|000023f0| 66 20 74 68 65 20 38 30 | 34 32 20 55 50 49 20 68 |f the 80|42 UPI h|
|00002400| 61 73 20 62 65 65 6e 20 | 64 65 72 69 76 65 64 20 |as been |derived |
|00002410| 66 72 6f 6d 20 74 68 65 | 20 45 76 65 72 65 78 0a |from the| Everex.|
|00002420| 58 53 54 45 50 20 33 38 | 36 20 48 61 72 64 77 61 |XSTEP 38|6 Hardwa|
|00002430| 72 65 20 53 65 72 76 69 | 63 65 20 61 6e 64 20 4d |re Servi|ce and M|
|00002440| 61 69 6e 74 65 6e 61 6e | 63 65 20 47 75 69 64 65 |aintenan|ce Guide|
|00002450| 2c 20 70 61 72 74 0a 58 | 6e 75 6d 62 65 72 20 4b |, part.X|number K|
|00002460| 49 54 20 30 30 30 37 36 | 2d 30 30 20 28 61 62 6f |IT 00076|-00 (abo|
|00002470| 75 74 20 61 20 68 75 6e | 64 72 65 64 20 62 75 63 |ut a hun|dred buc|
|00002480| 6b 73 20 66 72 6f 6d 20 | 79 6f 75 72 0a 58 41 75 |ks from |your.XAu|
|00002490| 74 68 6f 72 69 7a 65 64 | 20 45 76 65 72 65 78 20 |thorized| Everex |
|000024a0| 64 65 61 6c 65 72 29 2e | 0a 58 2e 53 48 20 46 49 |dealer).|.X.SH FI|
|000024b0| 4c 45 53 0a 58 2f 64 65 | 76 2f 6c 65 64 0a 58 2e |LES.X/de|v/led.X.|
|000024c0| 62 72 0a 58 2f 64 65 76 | 2f 6c 65 64 31 0a 58 2e |br.X/dev|/led1.X.|
|000024d0| 62 72 0a 58 2f 64 65 76 | 2f 6c 65 64 32 0a 58 2e |br.X/dev|/led2.X.|
|000024e0| 62 72 0a 58 2f 64 65 76 | 2f 6c 65 64 63 6c 6f 63 |br.X/dev|/ledcloc|
|000024f0| 6b 0a 58 2e 53 48 20 53 | 45 45 20 41 4c 53 4f 0a |k.X.SH S|EE ALSO.|
|00002500| 58 6c 65 64 74 69 6d 65 | 28 31 29 0a 58 2e 53 48 |Xledtime|(1).X.SH|
|00002510| 20 41 55 54 48 4f 52 0a | 58 53 74 65 70 68 65 6e | AUTHOR.|XStephen|
|00002520| 20 4a 2e 20 46 72 69 65 | 64 6c 20 28 66 72 65 64 | J. Frie|dl (fred|
|00002530| 40 6d 74 6e 64 65 77 2e | 54 75 73 74 69 6e 2e 43 |@mtndew.|Tustin.C|
|00002540| 41 2e 55 53 29 0a 58 2e | 62 72 0a 58 44 27 41 72 |A.US).X.|br.XD'Ar|
|00002550| 63 79 20 4a 2e 4d 2e 20 | 43 61 69 6e 20 28 64 61 |cy J.M. |Cain (da|
|00002560| 72 63 79 40 64 72 75 69 | 64 2e 55 55 43 50 29 0a |rcy@drui|d.UUCP).|
|00002570| 58 2e 53 48 20 43 4f 50 | 59 52 49 47 48 54 0a 58 |X.SH COP|YRIGHT.X|
|00002580| 49 6e 20 74 68 65 20 73 | 70 69 72 69 74 20 6f 66 |In the s|pirit of|
|00002590| 20 66 72 65 65 20 69 6e | 74 65 72 63 68 61 6e 67 | free in|terchang|
|000025a0| 65 20 6f 66 20 28 68 6f | 70 65 66 75 6c 6c 79 29 |e of (ho|pefully)|
|000025b0| 20 68 69 67 68 0a 58 71 | 75 61 6c 69 74 79 20 73 | high.Xq|uality s|
|000025c0| 6f 66 74 77 61 72 65 2c | 20 74 68 69 73 20 64 72 |oftware,| this dr|
|000025d0| 69 76 65 72 20 69 73 20 | 72 65 6c 65 61 73 65 64 |iver is |released|
|000025e0| 20 74 6f 20 74 68 65 20 | 70 75 62 6c 69 63 0a 58 | to the |public.X|
|000025f0| 64 6f 6d 61 69 6e 20 61 | 6e 64 20 63 61 6e 20 62 |domain a|nd can b|
|00002600| 65 20 75 73 65 64 20 66 | 6f 72 20 61 6e 79 20 70 |e used f|or any p|
|00002610| 75 72 70 6f 73 65 73 20 | 61 74 20 61 6c 6c 2c 20 |urposes |at all, |
|00002620| 69 6e 63 6c 75 64 69 6e | 67 0a 58 70 65 72 73 6f |includin|g.Xperso|
|00002630| 6e 61 6c 2c 20 63 6f 6d | 6d 65 72 63 69 61 6c 2c |nal, com|mercial,|
|00002640| 20 6d 69 6c 69 74 61 72 | 79 2c 20 62 6c 61 63 6b | militar|y, black|
|00002650| 6d 61 69 6c 2c 20 65 74 | 63 2e 0a 45 4e 44 5f 4f |mail, et|c..END_O|
|00002660| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 31 |F_FILE.i|f test 1|
|00002670| 39 37 39 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |979 -ne |`wc -c <|
|00002680| 27 6c 65 64 2e 37 27 60 | 3b 20 74 68 65 6e 0a 20 |'led.7'`|; then. |
|00002690| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|000026a0| 27 6c 65 64 2e 37 27 5c | 22 20 75 6e 70 61 63 6b |'led.7'\|" unpack|
|000026b0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|000026c0| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|000026d0| 27 6c 65 64 2e 37 27 0a | 66 69 0a 69 66 20 74 65 |'led.7'.|fi.if te|
|000026e0| 73 74 20 2d 66 20 27 6c | 65 64 2e 63 27 20 2d 61 |st -f 'l|ed.c' -a|
|000026f0| 20 22 24 7b 31 7d 22 20 | 21 3d 20 22 2d 63 22 20 | "${1}" |!= "-c" |
|00002700| 3b 20 74 68 65 6e 20 0a | 20 20 65 63 68 6f 20 73 |; then .| echo s|
|00002710| 68 61 72 3a 20 57 69 6c | 6c 20 6e 6f 74 20 63 6c |har: Wil|l not cl|
|00002720| 6f 62 62 65 72 20 65 78 | 69 73 74 69 6e 67 20 66 |obber ex|isting f|
|00002730| 69 6c 65 20 5c 22 27 6c | 65 64 2e 63 27 5c 22 0a |ile \"'l|ed.c'\".|
|00002740| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00002750| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 6c 65 |Extracti|ng \"'le|
|00002760| 64 2e 63 27 5c 22 20 5c | 28 37 38 35 39 20 63 68 |d.c'\" \|(7859 ch|
|00002770| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00002780| 73 2f 5e 58 2f 2f 22 20 | 3e 27 6c 65 64 2e 63 27 |s/^X//" |>'led.c'|
|00002790| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|000027a0| 0a 58 2f 2a 0a 58 20 2a | 20 6c 65 64 2e 63 0a 58 |.X/*.X *| led.c.X|
|000027b0| 20 2a 0a 58 20 2a 20 57 | 72 69 74 74 65 6e 20 62 | *.X * W|ritten b|
|000027c0| 79 3a 09 53 74 65 70 68 | 65 6e 20 4a 2e 20 46 72 |y:.Steph|en J. Fr|
|000027d0| 69 65 64 6c 0a 58 20 2a | 09 09 56 2d 53 79 73 74 |iedl.X *|..V-Syst|
|000027e0| 65 6d 73 2c 20 49 6e 63 | 2e 0a 58 20 2a 09 09 66 |ems, Inc|..X *..f|
|000027f0| 72 69 65 64 6c 40 6d 74 | 6e 64 65 77 2e 54 75 73 |riedl@mt|ndew.Tus|
|00002800| 74 69 6e 2e 43 41 2e 55 | 53 0a 58 20 2a 09 09 32 |tin.CA.U|S.X *..2|
|00002810| 39 20 4a 75 6c 79 2c 20 | 31 39 38 39 0a 58 20 2a |9 July, |1989.X *|
|00002820| 0a 58 20 2a 20 20 52 65 | 2d 77 72 69 74 74 65 6e |.X * Re|-written|
|00002830| 20 62 79 20 44 27 41 72 | 63 79 20 4a 2e 4d 2e 20 | by D'Ar|cy J.M. |
|00002840| 43 61 69 6e 0a 58 20 2a | 20 20 67 69 76 65 6e 20 |Cain.X *| given |
|00002850| 76 65 72 73 69 6f 6e 20 | 6e 75 6d 62 65 72 20 32 |version |number 2|
|00002860| 2e 30 0a 58 20 2a 0a 58 | 20 2a 09 54 68 69 73 20 |.0.X *.X| *.This |
|00002870| 69 73 20 61 20 64 72 69 | 76 65 72 20 66 6f 72 20 |is a dri|ver for |
|00002880| 74 68 65 20 66 72 6f 6e | 74 2d 70 61 6e 65 6c 20 |the fron|t-panel |
|00002890| 4c 45 44 73 20 6f 6e 20 | 61 6e 20 45 76 65 72 65 |LEDs on |an Evere|
|000028a0| 78 0a 58 20 2a 09 53 54 | 45 50 20 73 79 73 74 65 |x.X *.ST|EP syste|
|000028b0| 6d 2e 20 20 54 68 69 73 | 20 69 73 20 61 6e 20 65 |m. This| is an e|
|000028c0| 69 67 68 74 2d 63 68 61 | 72 61 63 74 65 72 20 64 |ight-cha|racter d|
|000028d0| 69 73 70 6c 61 79 2c 20 | 61 6e 64 20 69 73 0a 58 |isplay, |and is.X|
|000028e0| 20 2a 09 6e 6f 72 6d 61 | 6c 6c 79 20 64 72 69 76 | *.norma|lly driv|
|000028f0| 65 6e 20 62 79 20 74 68 | 65 20 42 49 4f 53 20 74 |en by th|e BIOS t|
|00002900| 6f 20 73 68 6f 77 20 74 | 68 65 20 63 75 72 72 65 |o show t|he curre|
|00002910| 6e 74 20 64 72 69 76 65 | 2c 0a 58 20 2a 09 63 79 |nt drive|,.X *.cy|
|00002920| 6c 69 6e 64 65 72 2c 20 | 61 6e 64 20 68 65 61 64 |linder, |and head|
|00002930| 20 62 65 69 6e 67 20 61 | 63 63 65 73 73 65 64 2e | being a|ccessed.|
|00002940| 20 20 55 4e 49 58 20 62 | 79 70 61 73 73 65 73 20 | UNIX b|ypasses |
|00002950| 74 68 65 20 42 49 4f 53 | 0a 58 20 2a 09 65 6e 74 |the BIOS|.X *.ent|
|00002960| 69 72 65 6c 79 2c 20 73 | 6f 20 69 74 20 66 72 65 |irely, s|o it fre|
|00002970| 65 7a 65 73 20 73 68 6f | 72 74 6c 79 20 61 66 74 |ezes sho|rtly aft|
|00002980| 65 72 20 62 6f 6f 74 75 | 70 2e 0a 58 20 2a 0a 58 |er bootu|p..X *.X|
|00002990| 20 2a 09 59 6f 75 20 63 | 61 6e 20 6d 61 6b 65 20 | *.You c|an make |
|000029a0| 74 68 65 20 74 68 69 6e | 67 20 64 69 73 70 6c 61 |the thin|g displa|
|000029b0| 79 20 73 6f 6d 65 20 63 | 75 74 65 20 73 69 67 6e |y some c|ute sign|
|000029c0| 6f 6e 20 6d 65 73 73 61 | 67 65 20 77 68 65 6e 0a |on messa|ge when.|
|000029d0| 58 20 2a 09 74 68 65 20 | 6d 61 63 68 69 6e 65 20 |X *.the |machine |
|000029e0| 62 6f 6f 74 73 20 62 79 | 20 73 65 74 74 69 6e 67 |boots by| setting|
|000029f0| 20 74 68 65 20 73 74 72 | 69 6e 67 20 4c 45 44 5f | the str|ing LED_|
|00002a00| 49 4e 49 54 5f 53 54 52 | 20 69 6e 20 74 68 65 20 |INIT_STR| in the |
|00002a10| 6d 61 6b 65 0a 58 20 2a | 20 20 66 69 6c 65 2e 20 |make.X *| file. |
|00002a20| 20 41 20 6e 6f 72 6d 61 | 6c 20 77 72 69 74 65 20 | A norma|l write |
|00002a30| 63 61 6c 6c 20 77 69 6c | 6c 20 73 63 72 6f 6c 6c |call wil|l scroll|
|00002a40| 20 74 68 65 20 6f 75 74 | 70 75 74 20 61 63 72 6f | the out|put acro|
|00002a50| 73 73 20 74 68 65 20 4c | 45 44 73 0a 58 20 2a 20 |ss the L|EDs.X * |
|00002a60| 20 28 72 65 66 65 72 72 | 65 64 20 74 6f 20 62 79 | (referr|ed to by|
|00002a70| 20 61 20 66 72 69 65 6e | 64 20 61 73 20 22 74 69 | a frien|d as "ti|
|00002a80| 6d 65 73 20 73 71 75 61 | 72 69 6e 67 22 20 74 68 |mes squa|ring" th|
|00002a90| 65 20 6f 75 74 70 75 74 | 2e 29 20 20 54 68 65 72 |e output|.) Ther|
|00002aa0| 65 0a 58 20 2a 20 20 61 | 72 65 20 74 77 6f 20 69 |e.X * a|re two i|
|00002ab0| 6f 63 74 6c 20 63 61 6c | 6c 73 20 61 76 61 69 6c |octl cal|ls avail|
|00002ac0| 61 62 6c 65 2e 20 20 46 | 75 6e 63 74 69 6f 6e 20 |able. F|unction |
|00002ad0| 30 20 72 65 2d 64 69 73 | 70 6c 61 79 73 20 74 68 |0 re-dis|plays th|
|00002ae0| 65 20 73 69 67 6e 6f 6e | 0a 58 20 2a 20 20 6d 65 |e signon|.X * me|
|00002af0| 73 73 61 67 65 20 61 6e | 64 20 66 75 6e 63 74 69 |ssage an|d functi|
|00002b00| 6f 6e 20 31 20 64 69 73 | 70 6c 61 79 73 20 74 68 |on 1 dis|plays th|
|00002b10| 65 20 6d 65 73 73 61 67 | 65 20 70 6f 69 6e 74 65 |e messag|e pointe|
|00002b20| 64 20 74 6f 20 62 79 20 | 74 68 65 20 74 68 69 72 |d to by |the thir|
|00002b30| 64 0a 58 20 2a 20 20 61 | 72 67 75 6d 65 6e 74 20 |d.X * a|rgument |
|00002b40| 74 6f 20 69 6f 63 74 6c | 2e 20 20 42 6f 74 68 20 |to ioctl|. Both |
|00002b50| 6f 66 20 74 68 65 73 65 | 20 66 75 6e 63 74 69 6f |of these| functio|
|00002b60| 6e 73 20 64 69 73 70 6c | 61 79 20 61 6c 6c 20 61 |ns displ|ay all a|
|00002b70| 74 20 6f 6e 63 65 20 61 | 73 0a 58 20 2a 20 20 6f |t once a|s.X * o|
|00002b80| 70 70 6f 73 65 64 20 74 | 6f 20 74 68 65 20 73 63 |pposed t|o the sc|
|00002b90| 72 6f 6c 6c 20 65 66 66 | 65 63 74 20 6f 66 20 74 |roll eff|ect of t|
|00002ba0| 68 65 20 6e 6f 72 6d 61 | 6c 20 77 72 69 74 65 20 |he norma|l write |
|00002bb0| 63 61 6c 6c 2e 0a 58 20 | 2a 0a 58 20 2a 20 20 54 |call..X |*.X * T|
|00002bc0| 68 65 72 65 20 61 72 65 | 20 6d 75 6c 74 69 70 6c |here are| multipl|
|00002bd0| 65 20 64 65 76 69 63 65 | 73 20 61 76 61 69 6c 61 |e device|s availa|
|00002be0| 62 6c 65 20 74 6f 20 74 | 68 65 20 75 73 65 72 2e |ble to t|he user.|
|00002bf0| 20 20 54 68 65 20 77 61 | 79 20 74 68 61 74 20 74 | The wa|y that t|
|00002c00| 68 69 73 0a 58 20 2a 20 | 20 77 6f 72 6b 73 20 69 |his.X * | works i|
|00002c10| 73 20 74 68 61 74 20 61 | 6e 79 20 6f 66 20 74 68 |s that a|ny of th|
|00002c20| 65 20 64 65 76 69 63 65 | 73 20 6d 61 79 20 62 65 |e device|s may be|
|00002c30| 20 6f 70 65 6e 65 64 20 | 62 79 20 61 6e 79 20 70 | opened |by any p|
|00002c40| 72 6f 63 65 73 73 20 62 | 75 74 0a 58 20 2a 20 20 |rocess b|ut.X * |
|00002c50| 65 61 63 68 20 69 73 20 | 6f 70 65 6e 65 64 20 65 |each is |opened e|
|00002c60| 78 63 6c 75 73 69 76 65 | 6c 79 20 61 6e 64 20 65 |xclusive|ly and e|
|00002c70| 61 63 68 20 64 65 76 69 | 63 65 20 62 6c 6f 63 6b |ach devi|ce block|
|00002c80| 73 20 77 68 69 6c 65 20 | 64 65 76 69 63 65 73 0a |s while |devices.|
|00002c90| 58 20 2a 20 20 77 69 74 | 68 20 61 20 68 69 67 68 |X * wit|h a high|
|00002ca0| 65 72 20 6d 69 6e 6f 72 | 20 6e 75 6d 62 65 72 20 |er minor| number |
|00002cb0| 61 72 65 20 6f 70 65 6e | 2e 20 20 54 68 65 20 69 |are open|. The i|
|00002cc0| 64 65 61 20 69 73 20 74 | 6f 20 70 75 74 20 73 6f |dea is t|o put so|
|00002cd0| 6d 65 74 68 69 6e 67 0a | 58 20 2a 20 20 6c 69 6b |mething.|X * lik|
|00002ce0| 65 20 6c 65 64 74 69 6d | 65 20 6f 6e 20 74 68 65 |e ledtim|e on the|
|00002cf0| 20 6c 6f 77 65 73 74 20 | 64 65 76 69 63 65 20 61 | lowest |device a|
|00002d00| 6e 64 20 6c 65 74 74 69 | 6e 67 20 6f 74 68 65 72 |nd letti|ng other|
|00002d10| 20 74 68 69 6e 67 73 20 | 69 6e 74 65 72 75 70 74 | things |interupt|
|00002d20| 0a 58 20 2a 20 20 69 74 | 20 74 65 6d 70 6f 72 61 |.X * it| tempora|
|00002d30| 72 69 6c 79 2e 0a 58 20 | 2a 0a 58 20 2a 20 20 54 |rily..X |*.X * T|
|00002d40| 68 69 73 20 64 72 69 76 | 65 72 20 68 61 73 20 62 |his driv|er has b|
|00002d50| 65 65 6e 20 74 65 73 74 | 65 64 20 6f 6e 20 61 6e |een test|ed on an|
|00002d60| 20 45 76 65 72 65 78 20 | 53 54 45 50 2f 32 35 20 | Everex |STEP/25 |
|00002d70| 72 75 6e 6e 69 6e 67 0a | 58 20 2a 09 45 73 69 78 |running.|X *.Esix|
|00002d80| 20 53 79 73 74 65 6d 20 | 56 20 52 65 6c 65 61 73 | System |V Releas|
|00002d90| 65 20 34 2e 30 2e 34 20 | 62 65 74 61 2e 20 20 49 |e 4.0.4 |beta. I|
|00002da0| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 61 62 6f 75 74 |nformati|on about|
|00002db0| 20 74 68 65 0a 58 20 2a | 09 75 73 61 67 65 20 6f | the.X *|.usage o|
|00002dc0| 66 20 74 68 65 20 38 30 | 34 32 20 55 50 49 20 68 |f the 80|42 UPI h|
|00002dd0| 61 73 20 62 65 65 6e 20 | 64 65 72 69 76 65 64 20 |as been |derived |
|00002de0| 66 72 6f 6d 20 74 68 65 | 20 45 76 65 72 65 78 0a |from the| Everex.|
|00002df0| 58 20 2a 09 53 54 45 50 | 20 33 38 36 20 48 61 72 |X *.STEP| 386 Har|
|00002e00| 64 77 61 72 65 20 53 65 | 72 76 69 63 65 20 61 6e |dware Se|rvice an|
|00002e10| 64 20 4d 61 69 6e 74 65 | 6e 61 6e 63 65 20 47 75 |d Mainte|nance Gu|
|00002e20| 69 64 65 2c 20 70 61 72 | 74 0a 58 20 2a 09 6e 75 |ide, par|t.X *.nu|
|00002e30| 6d 62 65 72 20 4b 49 54 | 20 30 30 30 37 36 2d 30 |mber KIT| 00076-0|
|00002e40| 30 20 28 61 62 6f 75 74 | 20 61 20 68 75 6e 64 72 |0 (about| a hundr|
|00002e50| 65 64 20 62 75 63 6b 73 | 20 66 72 6f 6d 20 79 6f |ed bucks| from yo|
|00002e60| 75 72 0a 58 20 2a 09 41 | 75 74 68 6f 72 69 7a 65 |ur.X *.A|uthorize|
|00002e70| 64 20 45 76 65 72 65 78 | 20 64 65 61 6c 65 72 29 |d Everex| dealer)|
|00002e80| 2e 0a 58 20 2a 0a 58 20 | 2a 09 3d 3d 3d 3d 3d 3d |..X *.X |*.======|
|00002e90| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002ea0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002eb0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002ec0| 3d 3d 0a 58 20 2a 09 49 | 6e 20 74 68 65 20 73 70 |==.X *.I|n the sp|
|00002ed0| 69 72 69 74 20 6f 66 20 | 66 72 65 65 20 69 6e 74 |irit of |free int|
|00002ee0| 65 72 63 68 61 6e 67 65 | 20 6f 66 20 7b 20 68 6f |erchange| of { ho|
|00002ef0| 70 65 66 75 6c 6c 79 20 | 7d 20 68 69 67 68 2d 0a |pefully |} high-.|
|00002f00| 58 20 2a 09 71 75 61 6c | 69 74 79 20 73 6f 66 74 |X *.qual|ity soft|
|00002f10| 77 61 72 65 2c 20 74 68 | 69 73 20 64 72 69 76 65 |ware, th|is drive|
|00002f20| 72 20 69 73 20 72 65 6c | 65 61 73 65 64 20 74 6f |r is rel|eased to|
|00002f30| 20 74 68 65 20 70 75 62 | 6c 69 63 0a 58 20 2a 09 | the pub|lic.X *.|
|00002f40| 64 6f 6d 61 69 6e 20 61 | 6e 64 20 63 61 6e 20 62 |domain a|nd can b|
|00002f50| 65 20 75 73 65 64 20 66 | 6f 72 20 61 6e 79 20 70 |e used f|or any p|
|00002f60| 75 72 70 6f 73 65 73 20 | 61 74 20 61 6c 6c 2c 20 |urposes |at all, |
|00002f70| 69 6e 63 6c 75 64 69 6e | 67 0a 58 20 2a 09 70 65 |includin|g.X *.pe|
|00002f80| 72 73 6f 6e 61 6c 2c 20 | 63 6f 6d 6d 65 72 63 69 |rsonal, |commerci|
|00002f90| 61 6c 2c 20 6d 69 6c 69 | 74 61 72 79 2c 20 62 6c |al, mili|tary, bl|
|00002fa0| 61 63 6b 6d 61 69 6c 2c | 20 65 74 63 2e 0a 58 20 |ackmail,| etc..X |
|00002fb0| 2a 0a 58 20 2a 09 48 61 | 76 65 20 66 75 6e 2c 20 |*.X *.Ha|ve fun, |
|00002fc0| 66 6f 6c 6b 73 2e 0a 58 | 20 2a 09 3d 3d 3d 3d 3d |folks..X| *.=====|
|00002fd0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002fe0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00002ff0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00003000| 3d 3d 3d 0a 58 20 2a 20 | 20 41 64 64 69 74 69 6f |===.X * | Additio|
|00003010| 6e 61 6c 20 66 72 6f 6d | 20 44 27 41 72 63 79 3a |nal from| D'Arcy:|
|00003020| 20 20 49 20 61 6d 20 69 | 6e 63 6c 75 64 69 6e 67 | I am i|ncluding|
|00003030| 20 6d 79 20 63 68 61 6e | 67 65 73 20 69 6e 20 74 | my chan|ges in t|
|00003040| 68 65 0a 58 20 2a 20 20 | 61 62 6f 76 65 20 72 65 |he.X * |above re|
|00003050| 6c 65 61 73 65 2e 0a 58 | 20 2a 2f 0a 58 0a 58 23 |lease..X| */.X.X#|
|00003060| 64 65 66 69 6e 65 09 09 | 5f 4b 45 52 4e 45 4c 09 |define..|_KERNEL.|
|00003070| 09 31 0a 58 23 69 6e 63 | 6c 75 64 65 09 3c 6c 69 |.1.X#inc|lude.<li|
|00003080| 6d 69 74 73 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |mits.h>.|X#includ|
|00003090| 65 09 3c 73 79 73 2f 74 | 79 70 65 73 2e 68 3e 0a |e.<sys/t|ypes.h>.|
|000030a0| 58 23 69 6e 63 6c 75 64 | 65 09 3c 73 79 73 2f 70 |X#includ|e.<sys/p|
|000030b0| 61 72 61 6d 2e 68 3e 0a | 58 23 69 6e 63 6c 75 64 |aram.h>.|X#includ|
|000030c0| 65 09 3c 73 79 73 2f 75 | 73 65 72 2e 68 3e 0a 58 |e.<sys/u|ser.h>.X|
|000030d0| 23 69 6e 63 6c 75 64 65 | 09 3c 73 79 73 2f 73 79 |#include|.<sys/sy|
|000030e0| 73 74 6d 2e 68 3e 0a 58 | 23 69 6e 63 6c 75 64 65 |stm.h>.X|#include|
|000030f0| 09 3c 73 79 73 2f 73 79 | 73 6d 61 63 72 6f 73 2e |.<sys/sy|smacros.|
|00003100| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 09 3c 73 79 |h>.X#inc|lude.<sy|
|00003110| 73 2f 69 6e 6c 69 6e 65 | 2e 68 3e 0a 58 23 69 6e |s/inline|.h>.X#in|
|00003120| 63 6c 75 64 65 09 3c 73 | 79 73 2f 65 72 72 6e 6f |clude.<s|ys/errno|
|00003130| 2e 68 3e 0a 58 23 69 6e | 63 6c 75 64 65 09 3c 73 |.h>.X#in|clude.<s|
|00003140| 79 73 2f 73 69 67 6e 61 | 6c 2e 68 3e 0a 58 23 69 |ys/signa|l.h>.X#i|
|00003150| 6e 63 6c 75 64 65 09 3c | 73 79 73 2f 64 69 72 2e |nclude.<|sys/dir.|
|00003160| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 09 3c 73 79 |h>.X#inc|lude.<sy|
|00003170| 73 2f 63 6c 6f 63 6b 2e | 68 3e 0a 58 23 69 6e 63 |s/clock.|h>.X#inc|
|00003180| 6c 75 64 65 09 3c 73 79 | 73 2f 63 6d 6e 5f 65 72 |lude.<sy|s/cmn_er|
|00003190| 72 2e 68 3e 0a 58 0a 58 | 23 64 65 66 69 6e 65 09 |r.h>.X.X|#define.|
|000031a0| 09 4c 45 44 5f 57 49 44 | 54 48 09 38 0a 58 23 64 |.LED_WID|TH.8.X#d|
|000031b0| 65 66 69 6e 65 09 09 4c | 45 44 5f 42 4c 41 4e 4b |efine..L|ED_BLANK|
|000031c0| 53 09 22 20 20 20 20 20 | 20 20 20 22 0a 58 0a 58 |S." | ".X.X|
|000031d0| 23 69 66 6e 64 65 66 09 | 09 4c 45 44 5f 4d 41 58 |#ifndef.|.LED_MAX|
|000031e0| 5f 44 45 56 0a 58 23 64 | 65 66 69 6e 65 09 09 4c |_DEV.X#d|efine..L|
|000031f0| 45 44 5f 4d 41 58 5f 44 | 45 56 09 09 34 0a 58 23 |ED_MAX_D|EV..4.X#|
|00003200| 65 6e 64 69 66 0a 58 0a | 58 23 69 66 6e 64 65 66 |endif.X.|X#ifndef|
|00003210| 09 09 4c 45 44 5f 49 4e | 49 54 5f 53 54 52 0a 58 |..LED_IN|IT_STR.X|
|00003220| 23 64 65 66 69 6e 65 09 | 09 4c 45 44 5f 49 4e 49 |#define.|.LED_INI|
|00003230| 54 5f 53 54 52 09 22 6c | 65 64 20 32 2e 30 22 0a |T_STR."l|ed 2.0".|
|00003240| 58 23 65 6e 64 69 66 0a | 58 0a 58 23 64 65 66 69 |X#endif.|X.X#defi|
|00003250| 6e 65 09 09 44 45 42 55 | 47 78 0a 58 0a 58 2f 2a |ne..DEBU|Gx.X.X/*|
|00003260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000032a0| 2d 2d 2d 2d 2d 2d 0a 58 | 20 2a 20 45 76 65 72 65 |------.X| * Evere|
|000032b0| 78 20 38 30 34 32 20 55 | 50 49 20 63 6f 6e 74 72 |x 8042 U|PI contr|
|000032c0| 6f 6c 6c 65 72 20 63 68 | 69 70 20 70 6f 72 74 20 |oller ch|ip port |
|000032d0| 64 65 66 69 6e 65 73 0a | 58 20 2a 2f 0a 58 23 64 |defines.|X */.X#d|
|000032e0| 65 66 69 6e 65 20 09 44 | 41 54 41 09 09 30 78 36 |efine .D|ATA..0x6|
|000032f0| 30 0a 58 23 64 65 66 69 | 6e 65 20 09 43 4f 4d 4d |0.X#defi|ne .COMM|
|00003300| 41 4e 44 09 09 30 78 36 | 34 0a 58 23 64 65 66 69 |AND..0x6|4.X#defi|
|00003310| 6e 65 20 09 53 54 41 54 | 55 53 09 09 30 78 36 34 |ne .STAT|US..0x64|
|00003320| 0a 58 0a 58 23 64 65 66 | 69 6e 65 20 09 42 55 53 |.X.X#def|ine .BUS|
|00003330| 59 09 09 30 78 30 32 0a | 58 0a 58 23 64 65 66 69 |Y..0x02.|X.X#defi|
|00003340| 6e 65 09 09 77 61 69 74 | 62 75 73 79 28 29 09 77 |ne..wait|busy().w|
|00003350| 68 69 6c 65 20 28 69 6e | 62 28 53 54 41 54 55 53 |hile (in|b(STATUS|
|00003360| 29 26 42 55 53 59 29 0a | 58 0a 58 73 74 61 74 69 |)&BUSY).|X.Xstati|
|00003370| 63 20 63 68 61 72 09 62 | 75 66 5b 4c 45 44 5f 57 |c char.b|uf[LED_W|
|00003380| 49 44 54 48 5d 3b 09 09 | 2f 2a 20 74 68 65 20 63 |IDTH];..|/* the c|
|00003390| 75 72 72 65 6e 74 20 64 | 69 73 70 6c 61 79 20 2a |urrent d|isplay *|
|000033a0| 2f 0a 58 73 74 61 74 69 | 63 20 69 6e 74 09 64 65 |/.Xstati|c int.de|
|000033b0| 76 5f 6f 70 65 6e 3b 09 | 09 09 2f 2a 20 63 75 72 |v_open;.|../* cur|
|000033c0| 72 65 6e 74 6c 79 20 6f | 70 65 6e 20 64 65 76 69 |rently o|pen devi|
|000033d0| 63 65 73 20 2a 2f 0a 58 | 0a 58 2f 2a 20 63 68 65 |ces */.X|.X/* che|
|000033e0| 63 6b 20 70 72 69 6f 72 | 69 74 79 20 6f 66 20 63 |ck prior|ity of c|
|000033f0| 75 72 72 65 6e 74 20 70 | 72 6f 63 65 73 73 20 2a |urrent p|rocess *|
|00003400| 2f 0a 58 2f 2a 20 69 66 | 20 68 69 67 68 65 72 20 |/.X/* if| higher |
|00003410| 64 65 76 69 63 65 20 6e | 75 6d 62 65 72 73 20 61 |device n|umbers a|
|00003420| 72 65 20 63 75 72 72 65 | 6e 74 6c 79 20 6f 70 65 |re curre|ntly ope|
|00003430| 6e 20 74 68 65 6e 20 67 | 6f 20 74 6f 20 73 6c 65 |n then g|o to sle|
|00003440| 65 70 20 2a 2f 0a 58 73 | 74 61 74 69 63 20 76 6f |ep */.Xs|tatic vo|
|00003450| 69 64 09 63 68 6b 5f 70 | 72 69 28 69 6e 74 20 64 |id.chk_p|ri(int d|
|00003460| 29 0a 58 7b 0a 58 09 69 | 6e 74 09 09 6b 20 3d 20 |).X{.X.i|nt..k = |
|00003470| 31 20 3c 3c 20 64 3b 0a | 58 0a 58 09 64 20 3d 20 |1 << d;.|X.X.d = |
|00003480| 2d 31 20 3c 3c 20 64 3b | 0a 58 0a 58 09 77 68 69 |-1 << d;|.X.X.whi|
|00003490| 6c 65 20 28 28 64 65 76 | 5f 6f 70 65 6e 20 26 20 |le ((dev|_open & |
|000034a0| 64 29 20 3e 20 6b 29 0a | 58 09 7b 0a 58 23 69 66 |d) > k).|X.{.X#if|
|000034b0| 64 65 66 09 44 45 42 55 | 47 0a 58 09 09 70 72 69 |def.DEBU|G.X..pri|
|000034c0| 6e 74 66 28 22 5c 6e 6c | 65 64 3a 20 70 72 69 6f |ntf("\nl|ed: prio|
|000034d0| 72 69 74 79 20 2d 20 64 | 65 76 5f 6f 70 65 6e 20 |rity - d|ev_open |
|000034e0| 3d 20 25 78 2c 20 74 68 | 69 73 20 3d 20 25 64 22 |= %x, th|is = %d"|
|000034f0| 2c 20 64 65 76 5f 6f 70 | 65 6e 2c 20 6b 29 3b 0a |, dev_op|en, k);.|
|00003500| 58 23 65 6e 64 69 66 0a | 58 0a 58 09 09 2f 2a 20 |X#endif.|X.X../* |
|00003510| 77 6f 6b 65 6e 20 75 70 | 20 62 79 20 6c 65 64 63 |woken up| by ledc|
|00003520| 6c 6f 73 65 20 2a 2f 0a | 58 09 09 2f 2a 20 6e 6f |lose */.|X../* no|
|00003530| 74 65 20 74 68 61 74 20 | 64 65 6c 61 79 73 20 73 |te that |delays s|
|00003540| 6c 65 65 70 20 6f 6e 20 | 62 75 66 20 72 61 74 68 |leep on |buf rath|
|00003550| 65 72 20 74 68 61 6e 20 | 26 64 65 76 5f 6f 70 65 |er than |&dev_ope|
|00003560| 6e 2a 2f 0a 58 09 09 73 | 6c 65 65 70 28 28 63 61 |n*/.X..s|leep((ca|
|00003570| 64 64 72 5f 74 29 28 26 | 64 65 76 5f 6f 70 65 6e |ddr_t)(&|dev_open|
|00003580| 29 2c 20 50 5a 45 52 4f | 20 2b 20 32 29 3b 0a 58 |), PZERO| + 2);.X|
|00003590| 09 7d 0a 58 7d 0a 58 0a | 58 73 74 61 74 69 63 20 |.}.X}.X.|Xstatic |
|000035a0| 76 6f 69 64 09 65 6e 64 | 5f 74 69 6d 65 6f 75 74 |void.end|_timeout|
|000035b0| 28 76 6f 69 64 29 0a 58 | 7b 0a 58 23 69 66 64 65 |(void).X|{.X#ifde|
|000035c0| 66 09 44 45 42 55 47 0a | 58 09 70 72 69 6e 74 66 |f.DEBUG.|X.printf|
|000035d0| 28 22 5c 6e 6c 65 64 3a | 20 52 69 73 65 20 61 6e |("\nled:| Rise an|
|000035e0| 64 20 73 68 69 6e 65 22 | 29 3b 0a 58 23 65 6e 64 |d shine"|);.X#end|
|000035f0| 69 66 0a 58 0a 58 09 77 | 61 6b 65 75 70 28 28 63 |if.X.X.w|akeup((c|
|00003600| 61 64 64 72 5f 74 29 28 | 62 75 66 29 29 3b 0a 58 |addr_t)(|buf));.X|
|00003610| 7d 0a 58 0a 58 23 69 66 | 6e 64 65 66 09 09 77 61 |}.X.X#if|ndef..wa|
|00003620| 69 74 62 75 73 79 0a 58 | 73 74 61 74 69 63 20 76 |itbusy.X|static v|
|00003630| 6f 69 64 09 77 61 69 74 | 62 75 73 79 28 76 6f 69 |oid.wait|busy(voi|
|00003640| 64 29 0a 58 7b 0a 58 09 | 77 68 69 6c 65 20 28 69 |d).X{.X.|while (i|
|00003650| 6e 62 28 53 54 41 54 55 | 53 29 20 26 20 42 55 53 |nb(STATU|S) & BUS|
|00003660| 59 29 0a 58 09 7b 0a 58 | 09 09 74 69 6d 65 6f 75 |Y).X.{.X|..timeou|
|00003670| 74 28 65 6e 64 5f 74 69 | 6d 65 6f 75 74 2c 20 4e |t(end_ti|meout, N|
|00003680| 55 4c 4c 2c 20 31 29 3b | 0a 58 09 09 73 6c 65 65 |ULL, 1);|.X..slee|
|00003690| 70 28 28 63 61 64 64 72 | 5f 74 29 28 62 75 66 29 |p((caddr|_t)(buf)|
|000036a0| 2c 20 50 5a 45 52 4f 20 | 2b 20 32 29 3b 0a 58 09 |, PZERO |+ 2);.X.|
|000036b0| 7d 0a 58 7d 0a 58 23 65 | 6e 64 69 66 0a 58 0a 58 |}.X}.X#e|ndif.X.X|
|000036c0| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|000036d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000036e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000036f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003700| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 20 2a 20 54 68 69 |--------|.X * Thi|
|00003710| 73 20 72 6f 75 74 69 6e | 65 20 6f 75 74 70 75 74 |s routin|e output|
|00003720| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 64 69 |s the cu|rrent di|
|00003730| 73 70 6c 61 79 20 69 6e | 20 62 75 66 20 74 6f 20 |splay in| buf to |
|00003740| 74 68 65 20 6c 65 64 73 | 0a 58 20 2a 2f 0a 58 73 |the leds|.X */.Xs|
|00003750| 74 61 74 69 63 20 76 6f | 69 64 09 6f 75 74 5f 62 |tatic vo|id.out_b|
|00003760| 75 66 28 76 6f 69 64 29 | 0a 58 7b 0a 58 09 69 6e |uf(void)|.X{.X.in|
|00003770| 74 09 09 6b 3b 0a 58 0a | 58 09 77 61 69 74 62 75 |t..k;.X.|X.waitbu|
|00003780| 73 79 28 29 3b 0a 58 09 | 6f 75 74 62 28 43 4f 4d |sy();.X.|outb(COM|
|00003790| 4d 41 4e 44 2c 20 30 78 | 62 30 29 3b 0a 58 0a 58 |MAND, 0x|b0);.X.X|
|000037a0| 09 66 6f 72 20 28 6b 20 | 3d 20 30 3b 20 6b 20 3c |.for (k |= 0; k <|
|000037b0| 20 4c 45 44 5f 57 49 44 | 54 48 3b 20 6b 2b 2b 29 | LED_WID|TH; k++)|
|000037c0| 0a 58 09 7b 0a 58 09 09 | 77 61 69 74 62 75 73 79 |.X.{.X..|waitbusy|
|000037d0| 28 29 3b 0a 58 09 09 6f | 75 74 62 28 44 41 54 41 |();.X..o|utb(DATA|
|000037e0| 2c 20 62 75 66 5b 6b 5d | 29 3b 0a 58 09 7d 0a 58 |, buf[k]|);.X.}.X|
|000037f0| 7d 0a 58 0a 58 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.X.X/*-|--------|
|00003800| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0a 58 20 |--------|-----.X |
|00003840| 2a 20 54 68 69 73 20 72 | 6f 75 74 69 6e 65 20 6f |* This r|outine o|
|00003850| 75 74 70 75 74 73 20 61 | 20 73 74 72 69 6e 67 2e |utputs a| string.|
|00003860| 20 20 41 6e 20 61 72 67 | 20 6f 66 20 4e 55 4c 4c | An arg| of NULL|
|00003870| 20 6f 75 74 70 75 74 73 | 20 74 68 65 20 73 69 67 | outputs| the sig|
|00003880| 6e 6f 6e 0a 58 20 2a 20 | 73 74 72 69 6e 67 2e 20 |non.X * |string. |
|00003890| 20 41 74 20 6d 6f 73 74 | 20 4c 45 44 5f 57 49 44 | At most| LED_WID|
|000038a0| 54 48 20 63 68 61 72 61 | 63 74 65 72 73 20 61 72 |TH chara|cters ar|
|000038b0| 65 20 6f 75 74 70 75 74 | 2e 20 20 49 66 20 74 68 |e output|. If th|
|000038c0| 65 72 65 20 61 72 65 0a | 58 20 2a 20 6c 65 73 73 |ere are.|X * less|
|000038d0| 20 63 68 61 72 61 63 74 | 65 72 73 2c 20 74 68 65 | charact|ers, the|
|000038e0| 20 6f 75 74 70 75 74 20 | 69 73 20 73 70 61 63 65 | output |is space|
|000038f0| 20 70 61 64 64 65 64 2e | 0a 58 20 2a 2f 0a 58 73 | padded.|.X */.Xs|
|00003900| 74 61 74 69 63 20 76 6f | 69 64 09 6f 75 74 5f 73 |tatic vo|id.out_s|
|00003910| 74 72 28 63 6f 6e 73 74 | 20 63 68 61 72 20 2a 73 |tr(const| char *s|
|00003920| 74 72 2c 20 69 6e 74 20 | 64 29 0a 58 7b 0a 58 09 |tr, int |d).X{.X.|
|00003930| 69 6e 74 09 09 6b 3b 0a | 58 0a 58 09 63 68 6b 5f |int..k;.|X.X.chk_|
|00003940| 70 72 69 28 64 29 3b 0a | 58 0a 58 09 69 66 20 28 |pri(d);.|X.X.if (|
|00003950| 21 73 74 72 29 0a 58 09 | 09 73 74 72 20 3d 20 4c |!str).X.|.str = L|
|00003960| 45 44 5f 49 4e 49 54 5f | 53 54 52 3b 0a 58 0a 58 |ED_INIT_|STR;.X.X|
|00003970| 09 2f 2a 20 66 69 6c 6c | 20 62 75 66 66 65 72 20 |./* fill| buffer |
|00003980| 77 69 74 68 20 75 70 20 | 74 6f 20 38 20 63 68 61 |with up |to 8 cha|
|00003990| 72 61 63 74 65 72 73 20 | 70 61 64 64 69 6e 67 20 |racters |padding |
|000039a0| 77 69 74 68 20 73 70 61 | 63 65 73 20 69 66 20 6e |with spa|ces if n|
|000039b0| 65 63 65 73 73 61 72 79 | 20 2a 2f 0a 58 09 66 6f |ecessary| */.X.fo|
|000039c0| 72 20 28 6b 20 3d 20 30 | 3b 20 6b 20 3c 20 4c 45 |r (k = 0|; k < LE|
|000039d0| 44 5f 57 49 44 54 48 3b | 20 6b 2b 2b 29 0a 58 09 |D_WIDTH;| k++).X.|
|000039e0| 09 69 66 20 28 2a 73 74 | 72 29 0a 58 09 09 09 62 |.if (*st|r).X...b|
|000039f0| 75 66 5b 6b 5d 20 3d 20 | 2a 73 74 72 2b 2b 3b 0a |uf[k] = |*str++;.|
|00003a00| 58 09 09 65 6c 73 65 0a | 58 09 09 09 62 75 66 5b |X..else.|X...buf[|
|00003a10| 6b 5d 20 3d 20 27 20 27 | 3b 0a 58 0a 58 09 6f 75 |k] = ' '|;.X.X.ou|
|00003a20| 74 5f 62 75 66 28 29 3b | 0a 58 7d 0a 58 0a 58 2f |t_buf();|.X}.X.X/|
|00003a30| 2a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*-------|--------|
|00003a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a70| 2d 2d 2d 2d 2d 2d 2d 0a | 58 20 2a 20 54 68 69 73 |-------.|X * This|
|00003a80| 20 72 6f 75 74 69 6e 65 | 20 6f 75 74 70 75 74 73 | routine| outputs|
|00003a90| 20 61 20 63 68 61 72 61 | 63 74 65 72 2e 20 20 49 | a chara|cter. I|
|00003aa0| 66 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |f the ar|gument i|
|00003ab0| 73 20 2d 31 20 74 68 65 | 6e 20 69 74 0a 58 20 2a |s -1 the|n it.X *|
|00003ac0| 20 64 69 73 70 6c 61 79 | 73 20 74 68 65 20 73 69 | display|s the si|
|00003ad0| 67 6e 6f 6e 20 6d 65 73 | 73 61 67 65 20 28 64 65 |gnon mes|sage (de|
|00003ae0| 66 69 6e 65 64 20 69 6e | 20 74 68 65 20 6d 61 6b |fined in| the mak|
|00003af0| 65 20 66 69 6c 65 2e 29 | 20 20 54 68 65 0a 58 20 |e file.)| The.X |
|00003b00| 2a 20 6f 75 74 70 75 74 | 20 28 6f 74 68 65 72 20 |* output| (other |
|00003b10| 74 68 61 6e 20 74 68 65 | 20 73 69 67 6e 6f 6e 29 |than the| signon)|
|00003b20| 20 73 63 72 6f 6c 6c 73 | 20 61 63 72 6f 73 73 20 | scrolls| across |
|00003b30| 74 68 65 20 6c 65 64 73 | 2e 0a 58 20 2a 2f 0a 58 |the leds|..X */.X|
|00003b40| 73 74 61 74 69 63 20 76 | 6f 69 64 09 6f 75 74 5f |static v|oid.out_|
|00003b50| 63 68 61 72 28 69 6e 74 | 20 63 2c 20 69 6e 74 20 |char(int| c, int |
|00003b60| 64 29 0a 58 7b 0a 58 09 | 69 6e 74 09 09 6b 3b 0a |d).X{.X.|int..k;.|
|00003b70| 58 0a 58 09 74 69 6d 65 | 6f 75 74 28 65 6e 64 5f |X.X.time|out(end_|
|00003b80| 74 69 6d 65 6f 75 74 2c | 20 28 63 61 64 64 72 5f |timeout,| (caddr_|
|00003b90| 74 29 28 30 29 2c 20 28 | 6c 6f 6e 67 29 28 48 5a |t)(0), (|long)(HZ|
|00003ba0| 2f 31 30 29 29 3b 0a 58 | 09 73 6c 65 65 70 28 28 |/10));.X|.sleep((|
|00003bb0| 63 61 64 64 72 5f 74 29 | 28 62 75 66 29 2c 20 50 |caddr_t)|(buf), P|
|00003bc0| 5a 45 52 4f 20 2b 20 32 | 29 3b 0a 58 09 0a 58 09 |ZERO + 2|);.X..X.|
|00003bd0| 63 68 6b 5f 70 72 69 28 | 64 29 3b 0a 58 09 0a 58 |chk_pri(|d);.X..X|
|00003be0| 09 66 6f 72 20 28 6b 20 | 3d 20 30 3b 20 6b 20 3c |.for (k |= 0; k <|
|00003bf0| 20 4c 45 44 5f 57 49 44 | 54 48 20 2d 20 31 3b 20 | LED_WID|TH - 1; |
|00003c00| 6b 2b 2b 29 0a 58 09 09 | 62 75 66 5b 6b 5d 20 3d |k++).X..|buf[k] =|
|00003c10| 20 62 75 66 5b 6b 20 2b | 20 31 5d 3b 0a 58 0a 58 | buf[k +| 1];.X.X|
|00003c20| 09 62 75 66 5b 6b 5d 20 | 3d 20 63 3b 0a 58 09 6f |.buf[k] |= c;.X.o|
|00003c30| 75 74 5f 62 75 66 28 29 | 3b 0a 58 7d 0a 58 0a 58 |ut_buf()|;.X}.X.X|
|00003c40| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00003c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c80| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 20 2a 20 6c 65 64 |--------|.X * led|
|00003c90| 69 6e 69 74 28 29 0a 58 | 20 2a 0a 58 20 2a 09 54 |init().X| *.X *.T|
|00003ca0| 68 69 73 20 69 73 20 63 | 61 6c 6c 65 64 20 62 79 |his is c|alled by|
|00003cb0| 20 74 68 65 20 6b 65 72 | 6e 65 6c 20 65 61 72 6c | the ker|nel earl|
|00003cc0| 79 20 69 6e 20 74 68 65 | 20 62 6f 6f 74 20 73 65 |y in the| boot se|
|00003cd0| 71 75 65 6e 63 65 2c 20 | 61 6e 64 20 77 65 0a 58 |quence, |and we.X|
|00003ce0| 20 2a 09 73 69 6d 70 6c | 79 20 64 69 73 70 6c 61 | *.simpl|y displa|
|00003cf0| 79 20 73 6f 6d 65 20 6d | 6f 72 65 20 72 65 61 73 |y some m|ore reas|
|00003d00| 6f 6e 61 62 6c 65 20 6d | 65 73 73 61 67 65 20 68 |onable m|essage h|
|00003d10| 65 72 65 20 69 6e 73 74 | 65 61 64 20 6f 66 20 74 |ere inst|ead of t|
|00003d20| 68 65 0a 58 20 2a 09 6c | 61 73 74 20 63 79 6c 69 |he.X *.l|ast cyli|
|00003d30| 6e 64 65 72 20 61 63 63 | 65 73 73 65 64 20 62 79 |nder acc|essed by|
|00003d40| 20 74 68 65 20 42 49 4f | 53 2e 20 20 54 68 69 73 | the BIO|S. This|
|00003d50| 20 63 61 6e 20 62 65 20 | 77 68 61 74 65 76 65 72 | can be |whatever|
|00003d60| 20 79 6f 75 20 6c 69 6b | 65 2c 0a 58 20 2a 09 44 | you lik|e,.X *.D|
|00003d70| 65 66 69 6e 65 20 79 6f | 75 72 20 6d 65 73 73 61 |efine yo|ur messa|
|00003d80| 67 65 20 69 6e 20 74 68 | 65 20 6d 61 6b 65 20 66 |ge in th|e make f|
|00003d90| 69 6c 65 2e 0a 58 20 2a | 0a 58 20 2a 09 42 65 20 |ile..X *|.X *.Be |
|00003da0| 63 72 65 61 74 69 76 65 | 21 0a 58 20 2a 2f 0a 58 |creative|!.X */.X|
|00003db0| 76 6f 69 64 20 6c 65 64 | 69 6e 69 74 28 76 6f 69 |void led|init(voi|
|00003dc0| 64 29 0a 58 7b 0a 58 09 | 70 72 69 6e 74 66 28 22 |d).X{.X.|printf("|
|00003dd0| 4c 45 44 20 44 65 76 69 | 63 65 20 64 72 69 76 65 |LED Devi|ce drive|
|00003de0| 72 5c 6e 22 29 3b 0a 58 | 09 64 65 76 5f 6f 70 65 |r\n");.X|.dev_ope|
|00003df0| 6e 20 3d 20 30 3b 09 09 | 2f 2a 20 61 6c 6c 20 64 |n = 0;..|/* all d|
|00003e00| 65 76 69 63 65 73 20 63 | 6c 6f 73 65 64 20 2a 2f |evices c|losed */|
|00003e10| 0a 58 09 6f 75 74 5f 73 | 74 72 28 4e 55 4c 4c 2c |.X.out_s|tr(NULL,|
|00003e20| 20 30 29 3b 09 2f 2a 20 | 64 69 73 70 6c 61 79 20 | 0);./* |display |
|00003e30| 73 69 67 6e 6f 6e 20 2a | 2f 0a 58 7d 0a 58 0a 58 |signon *|/.X}.X.X|
|00003e40| 2f 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/*------|--------|
|00003e50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003e80| 2d 2d 2d 2d 2d 2d 2d 2d | 0a 58 20 2a 20 6c 65 64 |--------|.X * led|
|00003e90| 77 72 69 74 65 28 29 0a | 58 20 2a 0a 58 20 2a 09 |write().|X *.X *.|
|00003ea0| 44 6f 20 74 68 65 20 61 | 63 74 75 61 6c 20 77 72 |Do the a|ctual wr|
|00003eb0| 69 74 65 20 74 6f 20 74 | 68 65 20 64 69 73 70 6c |ite to t|he displ|
|00003ec0| 61 79 2e 0a 58 20 2a 2f | 0a 58 76 6f 69 64 20 6c |ay..X */|.Xvoid l|
|00003ed0| 65 64 77 72 69 74 65 28 | 64 65 76 5f 74 20 64 65 |edwrite(|dev_t de|
|00003ee0| 76 29 0a 58 7b 0a 58 09 | 69 6e 74 09 09 09 64 2c |v).X{.X.|int...d,|
|00003ef0| 20 6b 3b 0a 58 09 73 74 | 61 74 69 63 20 69 6e 74 | k;.X.st|atic int|
|00003f00| 09 73 70 20 3d 20 30 3b | 09 09 2f 2a 20 70 72 65 |.sp = 0;|../* pre|
|00003f10| 63 65 64 65 20 6e 65 78 | 74 20 77 69 74 68 20 73 |cede nex|t with s|
|00003f20| 70 61 63 65 20 66 6c 61 | 67 20 2a 2f 0a 58 0a 58 |pace fla|g */.X.X|
|00003f30| 09 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00003f40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003f70| 2d 0a 58 09 20 2a 20 67 | 72 61 62 20 74 68 65 20 |-.X. * g|rab the |
|00003f80| 63 68 61 72 61 63 74 65 | 72 73 20 66 72 6f 6d 20 |characte|rs from |
|00003f90| 74 68 65 20 75 73 65 72 | 20 73 70 61 63 65 20 61 |the user| space a|
|00003fa0| 6e 64 20 72 65 74 75 72 | 6e 20 61 20 66 61 75 6c |nd retur|n a faul|
|00003fb0| 74 0a 58 09 20 2a 20 65 | 72 72 6f 72 20 6f 6e 20 |t.X. * e|rror on |
|00003fc0| 61 20 62 61 64 20 61 64 | 64 72 65 73 73 2e 20 20 |a bad ad|dress. |
|00003fd0| 43 52 73 20 61 6e 64 20 | 4c 46 73 20 63 61 75 73 |CRs and |LFs caus|
|00003fe0| 65 20 74 68 65 20 64 69 | 73 70 6c 61 79 20 74 6f |e the di|splay to|
|00003ff0| 0a 58 09 20 2a 20 70 61 | 75 73 65 20 66 6f 72 20 |.X. * pa|use for |
|00004000| 31 20 73 65 63 6f 6e 64 | 20 77 68 69 6c 65 20 46 |1 second| while F|
|00004010| 46 73 20 64 69 73 70 6c | 61 79 20 74 68 65 20 73 |Fs displ|ay the s|
|00004020| 69 67 6e 6f 6e 20 6d 65 | 73 73 61 67 65 2e 0a 58 |ignon me|ssage..X|
|00004030| 09 20 2a 20 74 68 65 20 | 6f 74 68 65 72 20 63 6f |. * the |other co|
|00004040| 6e 74 72 6f 6c 20 63 68 | 61 72 61 63 74 65 72 73 |ntrol ch|aracters|
|00004050| 20 61 72 65 20 70 72 69 | 6e 74 65 64 2e 20 20 54 | are pri|nted. T|
|00004060| 72 79 20 74 68 65 6d 20 | 74 6f 0a 58 09 20 2a 20 |ry them |to.X. * |
|00004070| 73 65 65 20 77 68 61 74 | 20 74 68 65 79 20 64 69 |see what| they di|
|00004080| 73 70 6c 61 79 2e 0a 58 | 09 20 2a 2f 0a 58 0a 58 |splay..X|. */.X.X|
|00004090| 09 69 66 20 28 28 64 20 | 3d 20 6d 69 6e 6f 72 28 |.if ((d |= minor(|
|000040a0| 64 65 76 29 29 20 3c 20 | 30 20 7c 7c 20 64 20 3e |dev)) < |0 || d >|
|000040b0| 3d 20 4c 45 44 5f 4d 41 | 58 5f 44 45 56 29 0a 58 |= LED_MA|X_DEV).X|
|000040c0| 09 09 75 2e 75 5f 65 72 | 72 6f 72 20 3d 20 45 4e |..u.u_er|ror = EN|
|000040d0| 58 49 4f 3b 0a 58 20 20 | 20 20 65 6c 73 65 20 77 |XIO;.X | else w|
|000040e0| 68 69 6c 65 20 28 75 2e | 75 5f 63 6f 75 6e 74 29 |hile (u.|u_count)|
|000040f0| 0a 58 09 7b 0a 58 09 09 | 69 66 20 28 28 6b 20 3d |.X.{.X..|if ((k =|
|00004100| 20 63 70 61 73 73 28 29 | 29 20 3d 3d 20 27 5c 6e | cpass()|) == '\n|
|00004110| 27 20 7c 7c 20 6b 20 3d | 3d 20 27 5c 72 27 29 0a |' || k =|= '\r').|
|00004120| 58 09 09 7b 0a 58 09 09 | 09 73 70 20 3d 20 32 3b |X..{.X..|.sp = 2;|
|00004130| 0a 58 0a 58 09 09 09 74 | 69 6d 65 6f 75 74 28 65 |.X.X...t|imeout(e|
|00004140| 6e 64 5f 74 69 6d 65 6f | 75 74 2c 20 28 63 61 64 |nd_timeo|ut, (cad|
|00004150| 64 72 5f 74 29 28 30 29 | 2c 20 28 6c 6f 6e 67 29 |dr_t)(0)|, (long)|
|00004160| 28 48 5a 29 29 3b 0a 58 | 09 09 09 73 6c 65 65 70 |(HZ));.X|...sleep|
|00004170| 28 28 63 61 64 64 72 5f | 74 29 28 62 75 66 29 2c |((caddr_|t)(buf),|
|00004180| 20 50 5a 45 52 4f 20 2b | 20 32 29 3b 0a 58 09 09 | PZERO +| 2);.X..|
|00004190| 7d 0a 58 09 09 65 6c 73 | 65 20 69 66 20 28 6b 20 |}.X..els|e if (k |
|000041a0| 3d 3d 20 27 5c 66 27 29 | 0a 58 09 09 09 6f 75 74 |== '\f')|.X...out|
|000041b0| 5f 73 74 72 28 4e 55 4c | 4c 2c 20 64 29 3b 0a 58 |_str(NUL|L, d);.X|
|000041c0| 09 09 65 6c 73 65 20 69 | 66 20 28 6b 20 3d 3d 20 |..else i|f (k == |
|000041d0| 27 5c 74 27 29 0a 58 09 | 09 09 6f 75 74 5f 63 68 |'\t').X.|..out_ch|
|000041e0| 61 72 28 27 20 27 2c 20 | 64 29 3b 0a 58 09 09 65 |ar(' ', |d);.X..e|
|000041f0| 6c 73 65 0a 58 09 09 7b | 0a 58 09 09 09 69 66 20 |lse.X..{|.X...if |
|00004200| 28 73 70 29 0a 58 09 09 | 09 09 6f 75 74 5f 63 68 |(sp).X..|..out_ch|
|00004210| 61 72 28 27 20 27 2c 20 | 64 29 3b 0a 58 0a 58 09 |ar(' ', |d);.X.X.|
|00004220| 09 09 6f 75 74 5f 63 68 | 61 72 28 6b 2c 20 64 29 |..out_ch|ar(k, d)|
|00004230| 3b 0a 58 09 09 7d 0a 58 | 0a 58 09 09 69 66 20 28 |;.X..}.X|.X..if (|
|00004240| 73 70 29 0a 58 09 09 09 | 73 70 2d 2d 3b 0a 58 09 |sp).X...|sp--;.X.|
|00004250| 7d 0a 58 7d 0a 58 0a 58 | 2f 2a 20 6f 70 65 6e 20 |}.X}.X.X|/* open |
|00004260| 63 6c 65 61 72 73 20 74 | 68 65 20 64 69 73 70 6c |clears t|he displ|
|00004270| 61 79 20 2a 2f 0a 58 76 | 6f 69 64 09 6c 65 64 6f |ay */.Xv|oid.ledo|
|00004280| 70 65 6e 28 64 65 76 5f | 74 20 64 65 76 29 0a 58 |pen(dev_|t dev).X|
|00004290| 7b 0a 58 09 69 6e 74 09 | 09 64 3b 0a 58 0a 58 23 |{.X.int.|.d;.X.X#|
|000042a0| 69 66 64 65 66 09 44 45 | 42 55 47 0a 58 09 70 72 |ifdef.DE|BUG.X.pr|
|000042b0| 69 6e 74 66 28 22 5c 6e | 6c 65 64 6f 70 65 6e 3a |intf("\n|ledopen:|
|000042c0| 20 64 65 76 20 3d 20 25 | 78 22 2c 20 64 65 76 29 | dev = %|x", dev)|
|000042d0| 3b 0a 58 23 65 6e 64 69 | 66 0a 58 0a 58 09 69 66 |;.X#endi|f.X.X.if|
|000042e0| 20 28 28 64 20 3d 20 6d | 69 6e 6f 72 28 64 65 76 | ((d = m|inor(dev|
|000042f0| 29 29 20 3c 20 30 20 7c | 7c 20 64 20 3e 3d 20 4c |)) < 0 ||| d >= L|
|00004300| 45 44 5f 4d 41 58 5f 44 | 45 56 29 0a 58 09 09 75 |ED_MAX_D|EV).X..u|
|00004310| 2e 75 5f 65 72 72 6f 72 | 20 3d 20 45 4e 58 49 4f |.u_error| = ENXIO|
|00004320| 3b 0a 58 20 20 20 20 65 | 6c 73 65 20 69 66 20 28 |;.X e|lse if (|
|00004330| 28 31 20 3c 3c 20 64 29 | 20 26 20 64 65 76 5f 6f |(1 << d)| & dev_o|
|00004340| 70 65 6e 29 0a 58 09 09 | 75 2e 75 5f 65 72 72 6f |pen).X..|u.u_erro|
|00004350| 72 20 3d 20 45 42 55 53 | 59 3b 0a 58 20 20 20 20 |r = EBUS|Y;.X |
|00004360| 65 6c 73 65 0a 58 09 7b | 0a 58 23 69 66 64 65 66 |else.X.{|.X#ifdef|
|00004370| 09 44 45 42 55 47 0a 58 | 09 09 70 72 69 6e 74 66 |.DEBUG.X|..printf|
|00004380| 28 22 5c 6e 6c 65 64 6f | 70 65 6e 3a 20 64 20 3d |("\nledo|pen: d =|
|00004390| 20 25 78 2c 20 31 20 3c | 3c 20 64 20 3d 20 25 78 | %x, 1 <|< d = %x|
|000043a0| 22 2c 20 64 2c 20 31 20 | 3c 3c 20 64 29 3b 0a 58 |", d, 1 |<< d);.X|
|000043b0| 23 65 6e 64 69 66 0a 58 | 0a 58 09 09 64 65 76 5f |#endif.X|.X..dev_|
|000043c0| 6f 70 65 6e 20 7c 3d 20 | 28 31 20 3c 3c 20 64 29 |open |= |(1 << d)|
|000043d0| 3b 0a 58 09 09 6f 75 74 | 5f 73 74 72 28 4c 45 44 |;.X..out|_str(LED|
|000043e0| 5f 42 4c 41 4e 4b 53 2c | 20 64 29 3b 0a 58 09 7d |_BLANKS,| d);.X.}|
|000043f0| 0a 58 0a 58 23 69 66 64 | 65 66 09 44 45 42 55 47 |.X.X#ifd|ef.DEBUG|
|00004400| 0a 58 09 70 72 69 6e 74 | 66 28 22 5c 6e 6c 65 64 |.X.print|f("\nled|
|00004410| 6f 70 65 6e 3a 20 65 72 | 72 6f 72 20 3d 20 25 64 |open: er|ror = %d|
|00004420| 2c 20 64 20 3d 20 25 78 | 2c 20 31 3c 3c 64 20 3d |, d = %x|, 1<<d =|
|00004430| 20 25 78 22 2c 20 75 2e | 75 5f 65 72 72 6f 72 2c | %x", u.|u_error,|
|00004440| 20 64 2c 20 31 20 3c 3c | 20 64 29 3b 0a 58 23 65 | d, 1 <<| d);.X#e|
|00004450| 6e 64 69 66 0a 58 7d 0a | 58 0a 58 76 6f 69 64 09 |ndif.X}.|X.Xvoid.|
|00004460| 6c 65 64 63 6c 6f 73 65 | 28 64 65 76 5f 74 20 64 |ledclose|(dev_t d|
|00004470| 65 76 29 0a 58 7b 0a 58 | 09 69 6e 74 09 09 64 3b |ev).X{.X|.int..d;|
|00004480| 0a 58 0a 58 09 69 66 20 | 28 28 64 20 3d 20 6d 69 |.X.X.if |((d = mi|
|00004490| 6e 6f 72 28 64 65 76 29 | 29 20 3c 20 30 20 7c 7c |nor(dev)|) < 0 |||
|000044a0| 20 64 20 3e 3d 20 4c 45 | 44 5f 4d 41 58 5f 44 45 | d >= LE|D_MAX_DE|
|000044b0| 56 29 0a 58 09 09 75 2e | 75 5f 65 72 72 6f 72 20 |V).X..u.|u_error |
|000044c0| 3d 20 45 4e 58 49 4f 3b | 0a 58 20 20 20 20 65 6c |= ENXIO;|.X el|
|000044d0| 73 65 0a 58 09 09 64 65 | 76 5f 6f 70 65 6e 20 26 |se.X..de|v_open &|
|000044e0| 3d 20 7e 28 31 20 3c 3c | 20 64 29 3b 0a 58 0a 58 |= ~(1 <<| d);.X.X|
|000044f0| 23 69 66 64 65 66 09 44 | 45 42 55 47 0a 58 09 70 |#ifdef.D|EBUG.X.p|
|00004500| 72 69 6e 74 66 28 22 5c | 6e 6c 65 64 3a 20 43 6c |rintf("\|nled: Cl|
|00004510| 6f 73 65 20 64 65 76 69 | 63 65 20 25 64 22 2c 20 |ose devi|ce %d", |
|00004520| 64 29 3b 0a 58 23 65 6e | 64 69 66 0a 58 0a 58 09 |d);.X#en|dif.X.X.|
|00004530| 77 61 6b 65 75 70 28 28 | 63 61 64 64 72 5f 74 29 |wakeup((|caddr_t)|
|00004540| 28 26 64 65 76 5f 6f 70 | 65 6e 29 29 3b 0a 58 7d |(&dev_op|en));.X}|
|00004550| 0a 58 0a 58 2f 2a 0a 58 | 20 2a 20 69 6f 63 74 6c |.X.X/*.X| * ioctl|
|00004560| 20 66 75 6e 63 74 69 6f | 6e 20 61 6c 6c 6f 77 73 | functio|n allows|
|00004570| 20 73 69 67 6e 6f 6e 20 | 6d 65 73 73 61 67 65 20 | signon |message |
|00004580| 74 6f 20 62 65 20 64 69 | 73 70 6c 61 79 65 64 20 |to be di|splayed |
|00004590| 28 66 75 6e 63 74 69 6f | 6e 0a 58 20 2a 20 30 29 |(functio|n.X * 0)|
|000045a0| 20 6f 72 20 61 6e 79 20 | 73 74 72 69 6e 67 20 74 | or any |string t|
|000045b0| 6f 20 62 65 20 64 69 73 | 70 6c 61 79 20 28 31 29 |o be dis|play (1)|
|000045c0| 2e 20 20 49 6e 20 74 68 | 65 20 63 61 73 65 20 6f |. In th|e case o|
|000045d0| 66 20 66 75 6e 63 74 69 | 6f 6e 20 31 0a 58 20 2a |f functi|on 1.X *|
|000045e0| 20 74 68 65 20 6c 61 73 | 74 20 61 72 67 75 6d 65 | the las|t argume|
|000045f0| 6e 74 20 70 6f 69 6e 74 | 73 20 74 6f 20 74 68 65 |nt point|s to the|
|00004600| 20 73 74 72 69 6e 67 2e | 0a 58 2a 2f 0a 58 69 6e | string.|.X*/.Xin|
|00004610| 74 20 6c 65 64 69 6f 63 | 74 6c 28 64 65 76 5f 74 |t ledioc|tl(dev_t|
|00004620| 20 64 65 76 2c 20 69 6e | 74 20 63 6d 64 2c 20 63 | dev, in|t cmd, c|
|00004630| 68 61 72 20 2a 63 6d 64 | 61 72 67 29 0a 58 7b 0a |har *cmd|arg).X{.|
|00004640| 58 09 69 6e 74 09 09 64 | 3b 0a 58 0a 58 09 69 66 |X.int..d|;.X.X.if|
|00004650| 20 28 28 64 20 3d 20 6d | 69 6e 6f 72 28 64 65 76 | ((d = m|inor(dev|
|00004660| 29 29 20 3c 20 30 20 7c | 7c 20 64 20 3e 3d 20 4c |)) < 0 ||| d >= L|
|00004670| 45 44 5f 4d 41 58 5f 44 | 45 56 29 0a 58 09 09 75 |ED_MAX_D|EV).X..u|
|00004680| 2e 75 5f 65 72 72 6f 72 | 20 3d 20 45 4e 58 49 4f |.u_error| = ENXIO|
|00004690| 3b 0a 58 20 20 20 20 65 | 6c 73 65 20 69 66 20 28 |;.X e|lse if (|
|000046a0| 63 6d 64 20 3d 3d 20 30 | 29 0a 58 09 09 6f 75 74 |cmd == 0|).X..out|
|000046b0| 5f 73 74 72 28 4e 55 4c | 4c 2c 20 64 29 3b 0a 58 |_str(NUL|L, d);.X|
|000046c0| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 63 6d 64 | else| if (cmd|
|000046d0| 20 3d 3d 20 31 29 0a 58 | 20 20 20 20 7b 0a 58 09 | == 1).X| {.X.|
|000046e0| 09 69 6e 74 09 09 6b 3b | 0a 58 0a 58 09 09 63 68 |.int..k;|.X.X..ch|
|000046f0| 6b 5f 70 72 69 28 64 29 | 3b 0a 58 0a 58 09 09 66 |k_pri(d)|;.X.X..f|
|00004700| 6f 72 20 28 6b 20 3d 20 | 30 3b 20 6b 20 3c 20 4c |or (k = |0; k < L|
|00004710| 45 44 5f 57 49 44 54 48 | 3b 20 6b 2b 2b 29 0a 58 |ED_WIDTH|; k++).X|
|00004720| 09 09 09 69 66 20 28 2a | 63 6d 64 61 72 67 29 0a |...if (*|cmdarg).|
|00004730| 58 09 09 09 09 62 75 66 | 5b 6b 5d 20 3d 20 2a 63 |X....buf|[k] = *c|
|00004740| 6d 64 61 72 67 2b 2b 3b | 0a 58 09 09 09 65 6c 73 |mdarg++;|.X...els|
|00004750| 65 0a 58 09 09 09 09 62 | 75 66 5b 6b 5d 20 3d 20 |e.X....b|uf[k] = |
|00004760| 27 20 27 3b 0a 58 0a 58 | 09 09 6f 75 74 5f 62 75 |' ';.X.X|..out_bu|
|00004770| 66 28 29 3b 0a 58 20 20 | 20 20 7d 0a 58 20 20 20 |f();.X | }.X |
|00004780| 20 65 6c 73 65 0a 58 09 | 09 75 2e 75 5f 65 72 72 | else.X.|.u.u_err|
|00004790| 6f 72 20 3d 20 45 49 4e | 56 41 4c 3b 0a 58 7d 0a |or = EIN|VAL;.X}.|
|000047a0| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 0a 69 66 20 74 |END_OF_F|ILE.if t|
|000047b0| 65 73 74 20 37 38 35 39 | 20 2d 6e 65 20 60 77 63 |est 7859| -ne `wc|
|000047c0| 20 2d 63 20 3c 27 6c 65 | 64 2e 63 27 60 3b 20 74 | -c <'le|d.c'`; t|
|000047d0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|000047e0| 72 3a 20 5c 22 27 6c 65 | 64 2e 63 27 5c 22 20 75 |r: \"'le|d.c'\" u|
|000047f0| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00004800| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00004810| 64 20 6f 66 20 27 6c 65 | 64 2e 63 27 0a 66 69 0a |d of 'le|d.c'.fi.|
|00004820| 69 66 20 74 65 73 74 20 | 2d 66 20 27 6c 65 64 74 |if test |-f 'ledt|
|00004830| 69 6d 65 2e 31 27 20 2d | 61 20 22 24 7b 31 7d 22 |ime.1' -|a "${1}"|
|00004840| 20 21 3d 20 22 2d 63 22 | 20 3b 20 74 68 65 6e 20 | != "-c"| ; then |
|00004850| 0a 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 57 69 |. echo |shar: Wi|
|00004860| 6c 6c 20 6e 6f 74 20 63 | 6c 6f 62 62 65 72 20 65 |ll not c|lobber e|
|00004870| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 5c 22 27 |xisting |file \"'|
|00004880| 6c 65 64 74 69 6d 65 2e | 31 27 5c 22 0a 65 6c 73 |ledtime.|1'\".els|
|00004890| 65 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 45 78 74 |e.echo s|har: Ext|
|000048a0| 72 61 63 74 69 6e 67 20 | 5c 22 27 6c 65 64 74 69 |racting |\"'ledti|
|000048b0| 6d 65 2e 31 27 5c 22 20 | 5c 28 36 30 39 20 63 68 |me.1'\" |\(609 ch|
|000048c0| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|000048d0| 73 2f 5e 58 2f 2f 22 20 | 3e 27 6c 65 64 74 69 6d |s/^X//" |>'ledtim|
|000048e0| 65 2e 31 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |e.1' <<'|END_OF_F|
|000048f0| 49 4c 45 27 0a 58 5c 22 | 20 74 0a 58 2e 54 48 20 |ILE'.X\"| t.X.TH |
|00004900| 4c 45 44 54 49 4d 45 20 | 31 0a 58 2e 64 65 20 49 |LEDTIME |1.X.de I|
|00004910| 0a 58 5c 66 49 5c 5c 24 | 30 5c 66 52 0a 58 2e 2e |.X\fI\\$|0\fR.X..|
|00004920| 0a 58 2e 53 48 20 4e 41 | 4d 45 0a 58 6c 65 64 74 |.X.SH NA|ME.Xledt|
|00004930| 69 6d 65 20 2d 20 44 69 | 73 70 6c 61 79 73 20 74 |ime - Di|splays t|
|00004940| 69 6d 65 20 6f 6e 20 45 | 76 65 72 65 78 20 66 72 |ime on E|verex fr|
|00004950| 6f 6e 74 20 70 61 6e 65 | 6c 0a 58 2e 53 48 20 44 |ont pane|l.X.SH D|
|00004960| 45 53 43 52 49 50 54 49 | 4f 4e 0a 58 54 68 69 73 |ESCRIPTI|ON.XThis|
|00004970| 20 70 72 6f 67 72 61 6d | 20 64 69 73 70 6c 61 79 | program| display|
|00004980| 73 20 74 68 65 20 74 69 | 6d 65 20 6f 6e 20 74 68 |s the ti|me on th|
|00004990| 65 20 66 72 6f 6e 74 20 | 70 61 6e 65 6c 20 4c 45 |e front |panel LE|
|000049a0| 44 73 0a 58 6f 6e 20 61 | 6e 20 45 76 65 72 65 78 |Ds.Xon a|n Everex|
|000049b0| 20 53 74 65 70 20 6d 61 | 63 68 69 6e 65 2e 20 20 | Step ma|chine. |
|000049c0| 49 74 20 72 65 71 75 69 | 72 65 73 20 74 68 61 74 |It requi|res that|
|000049d0| 20 74 68 65 20 4c 45 44 | 20 64 72 69 76 65 72 20 | the LED| driver |
|000049e0| 62 65 20 69 6e 73 74 61 | 6c 6c 65 64 2e 0a 58 2e |be insta|lled..X.|
|000049f0| 53 48 20 46 49 4c 45 53 | 0a 58 2f 64 65 76 2f 6c |SH FILES|.X/dev/l|
|00004a00| 65 64 63 6c 6f 63 6b 0a | 58 2e 53 48 20 53 45 45 |edclock.|X.SH SEE|
|00004a10| 20 41 4c 53 4f 0a 58 6c | 65 64 28 37 29 0a 58 2e | ALSO.Xl|ed(7).X.|
|00004a20| 53 48 20 41 55 54 48 4f | 52 0a 58 53 74 65 70 68 |SH AUTHO|R.XSteph|
|00004a30| 65 6e 20 4a 2e 20 46 72 | 69 65 64 6c 20 28 66 72 |en J. Fr|iedl (fr|
|00004a40| 65 64 40 6d 74 6e 64 65 | 77 2e 54 75 73 74 69 6e |ed@mtnde|w.Tustin|
|00004a50| 2e 43 41 2e 55 53 29 0a | 58 2e 62 72 0a 58 44 27 |.CA.US).|X.br.XD'|
|00004a60| 41 72 63 79 20 4a 2e 4d | 2e 20 43 61 69 6e 20 28 |Arcy J.M|. Cain (|
|00004a70| 64 61 72 63 79 40 64 72 | 75 69 64 2e 55 55 43 50 |darcy@dr|uid.UUCP|
|00004a80| 29 0a 58 2e 53 48 20 43 | 4f 50 59 52 49 47 48 54 |).X.SH C|OPYRIGHT|
|00004a90| 0a 58 49 6e 20 74 68 65 | 20 73 70 69 72 69 74 20 |.XIn the| spirit |
|00004aa0| 6f 66 20 66 72 65 65 20 | 69 6e 74 65 72 63 68 61 |of free |intercha|
|00004ab0| 6e 67 65 20 6f 66 20 28 | 68 6f 70 65 66 75 6c 6c |nge of (|hopefull|
|00004ac0| 79 29 20 68 69 67 68 0a | 58 71 75 61 6c 69 74 79 |y) high.|Xquality|
|00004ad0| 20 73 6f 66 74 77 61 72 | 65 2c 20 74 68 69 73 20 | softwar|e, this |
|00004ae0| 64 72 69 76 65 72 20 69 | 73 20 72 65 6c 65 61 73 |driver i|s releas|
|00004af0| 65 64 20 74 6f 20 74 68 | 65 20 70 75 62 6c 69 63 |ed to th|e public|
|00004b00| 0a 58 64 6f 6d 61 69 6e | 20 61 6e 64 20 63 61 6e |.Xdomain| and can|
|00004b10| 20 62 65 20 75 73 65 64 | 20 66 6f 72 20 61 6e 79 | be used| for any|
|00004b20| 20 70 75 72 70 6f 73 65 | 73 20 61 74 20 61 6c 6c | purpose|s at all|
|00004b30| 2c 20 69 6e 63 6c 75 64 | 69 6e 67 0a 58 70 65 72 |, includ|ing.Xper|
|00004b40| 73 6f 6e 61 6c 2c 20 63 | 6f 6d 6d 65 72 63 69 61 |sonal, c|ommercia|
|00004b50| 6c 2c 20 6d 69 6c 69 74 | 61 72 79 2c 20 62 6c 61 |l, milit|ary, bla|
|00004b60| 63 6b 6d 61 69 6c 2c 20 | 65 74 63 2e 0a 45 4e 44 |ckmail, |etc..END|
|00004b70| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00004b80| 20 36 30 39 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 | 609 -ne| `wc -c |
|00004b90| 3c 27 6c 65 64 74 69 6d | 65 2e 31 27 60 3b 20 74 |<'ledtim|e.1'`; t|
|00004ba0| 68 65 6e 0a 20 20 20 20 | 65 63 68 6f 20 73 68 61 |hen. |echo sha|
|00004bb0| 72 3a 20 5c 22 27 6c 65 | 64 74 69 6d 65 2e 31 27 |r: \"'le|dtime.1'|
|00004bc0| 5c 22 20 75 6e 70 61 63 | 6b 65 64 20 77 69 74 68 |\" unpac|ked with|
|00004bd0| 20 77 72 6f 6e 67 20 73 | 69 7a 65 21 0a 66 69 0a | wrong s|ize!.fi.|
|00004be0| 23 20 65 6e 64 20 6f 66 | 20 27 6c 65 64 74 69 6d |# end of| 'ledtim|
|00004bf0| 65 2e 31 27 0a 66 69 0a | 69 66 20 74 65 73 74 20 |e.1'.fi.|if test |
|00004c00| 2d 66 20 27 6c 65 64 74 | 69 6d 65 2e 63 27 20 2d |-f 'ledt|ime.c' -|
|00004c10| 61 20 22 24 7b 31 7d 22 | 20 21 3d 20 22 2d 63 22 |a "${1}"| != "-c"|
|00004c20| 20 3b 20 74 68 65 6e 20 | 0a 20 20 65 63 68 6f 20 | ; then |. echo |
|00004c30| 73 68 61 72 3a 20 57 69 | 6c 6c 20 6e 6f 74 20 63 |shar: Wi|ll not c|
|00004c40| 6c 6f 62 62 65 72 20 65 | 78 69 73 74 69 6e 67 20 |lobber e|xisting |
|00004c50| 66 69 6c 65 20 5c 22 27 | 6c 65 64 74 69 6d 65 2e |file \"'|ledtime.|
|00004c60| 63 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |c'\".els|e.echo s|
|00004c70| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|00004c80| 5c 22 27 6c 65 64 74 69 | 6d 65 2e 63 27 5c 22 20 |\"'ledti|me.c'\" |
|00004c90| 5c 28 31 35 30 39 20 63 | 68 61 72 61 63 74 65 72 |\(1509 c|haracter|
|00004ca0| 73 5c 29 0a 73 65 64 20 | 22 73 2f 5e 58 2f 2f 22 |s\).sed |"s/^X//"|
|00004cb0| 20 3e 27 6c 65 64 74 69 | 6d 65 2e 63 27 20 3c 3c | >'ledti|me.c' <<|
|00004cc0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|00004cd0| 2a 0a 58 20 2a 20 6c 65 | 64 74 69 6d 65 28 29 0a |*.X * le|dtime().|
|00004ce0| 58 20 2a 0a 58 20 2a 20 | 77 72 69 74 74 65 6e 20 |X *.X * |written |
|00004cf0| 62 79 3a 09 53 74 65 70 | 68 65 6e 20 4a 2e 20 46 |by:.Step|hen J. F|
|00004d00| 72 69 65 64 6c 0a 58 20 | 2a 09 09 56 2d 53 79 73 |riedl.X |*..V-Sys|
|00004d10| 74 65 6d 73 2c 20 49 6e | 63 2e 0a 58 20 2a 09 09 |tems, In|c..X *..|
|00004d20| 2b 31 20 37 31 34 20 35 | 34 35 20 36 34 34 32 0a |+1 714 5|45 6442.|
|00004d30| 58 20 2a 09 09 66 72 69 | 65 64 6c 40 6d 74 6e 64 |X *..fri|edl@mtnd|
|00004d40| 65 77 2e 54 75 73 74 69 | 6e 2e 43 41 2e 55 53 0a |ew.Tusti|n.CA.US.|
|00004d50| 58 20 2a 0a 58 20 2a 20 | 20 4d 6f 64 69 66 69 65 |X *.X * | Modifie|
|00004d60| 64 20 74 6f 20 75 73 65 | 20 69 6f 63 74 6c 28 29 |d to use| ioctl()|
|00004d70| 20 62 79 20 44 27 41 72 | 63 79 20 4a 2e 4d 2e 20 | by D'Ar|cy J.M. |
|00004d80| 43 61 69 6e 20 28 64 61 | 72 63 79 40 64 72 75 69 |Cain (da|rcy@drui|
|00004d90| 64 2e 55 55 43 50 29 0a | 58 20 2a 0a 58 20 2a 09 |d.UUCP).|X *.X *.|
|00004da0| 54 68 69 73 20 70 72 6f | 67 72 61 6d 20 73 69 74 |This pro|gram sit|
|00004db0| 73 20 69 6e 20 74 68 65 | 20 62 61 63 6b 67 72 6f |s in the| backgro|
|00004dc0| 75 6e 64 20 61 6e 64 20 | 77 72 69 74 65 73 20 74 |und and |writes t|
|00004dd0| 68 65 20 63 75 72 72 65 | 6e 74 20 74 69 6d 65 20 |he curre|nt time |
|00004de0| 74 6f 20 74 68 65 0a 58 | 20 2a 20 20 6c 65 64 20 |to the.X| * led |
|00004df0| 64 65 76 69 63 65 20 76 | 69 61 20 69 6f 63 74 6c |device v|ia ioctl|
|00004e00| 20 66 75 6e 63 74 69 6f | 6e 20 31 20 73 6f 20 74 | functio|n 1 so t|
|00004e10| 68 65 20 45 76 65 72 65 | 78 20 66 72 6f 6e 74 2d |he Evere|x front-|
|00004e20| 70 61 6e 65 6c 20 64 69 | 73 70 6c 61 79 20 61 6c |panel di|splay al|
|00004e30| 77 61 79 73 0a 58 20 2a | 20 20 73 68 6f 77 73 20 |ways.X *| shows |
|00004e40| 74 68 65 20 74 69 6d 65 | 2e 20 20 54 68 69 73 20 |the time|. This |
|00004e50| 69 73 20 72 75 6e 20 66 | 72 6f 6d 20 69 6e 69 74 |is run f|rom init|
|00004e60| 74 61 62 2e 20 20 49 66 | 20 79 6f 75 20 70 72 65 |tab. If| you pre|
|00004e70| 66 65 72 20 6e 6f 74 20 | 74 6f 20 72 75 6e 20 74 |fer not |to run t|
|00004e80| 68 69 73 0a 58 20 2a 20 | 20 63 68 61 6e 67 65 20 |his.X * | change |
|00004e90| 74 68 65 20 72 65 6c 65 | 76 61 6e 74 20 6c 69 6e |the rele|vant lin|
|00004ea0| 65 20 69 6e 20 74 68 65 | 20 4d 61 6b 65 66 69 6c |e in the| Makefil|
|00004eb0| 65 2e 0a 58 20 2a 0a 58 | 20 2a 09 54 68 69 73 20 |e..X *.X| *.This |
|00004ec0| 69 73 20 69 6e 20 74 68 | 65 20 70 75 62 6c 69 63 |is in th|e public|
|00004ed0| 20 64 6f 6d 61 69 6e 20 | 28 6e 6f 74 20 74 68 61 | domain |(not tha|
|00004ee0| 74 20 79 6f 75 20 63 6f | 75 6c 64 6e 27 74 20 66 |t you co|uldn't f|
|00004ef0| 69 67 75 72 65 0a 58 20 | 2a 09 74 68 69 73 20 6f |igure.X |*.this o|
|00004f00| 75 74 20 69 6e 20 61 62 | 6f 75 74 20 74 77 6f 20 |ut in ab|out two |
|00004f10| 6d 69 6e 75 74 65 73 20 | 61 6e 79 77 61 79 29 2e |minutes |anyway).|
|00004f20| 0a 58 20 2a 2f 0a 58 0a | 58 23 69 6e 63 6c 75 64 |.X */.X.|X#includ|
|00004f30| 65 09 3c 73 74 64 69 6f | 2e 68 3e 0a 58 23 69 6e |e.<stdio|.h>.X#in|
|00004f40| 63 6c 75 64 65 09 3c 73 | 74 64 6c 69 62 2e 68 3e |clude.<s|tdlib.h>|
|00004f50| 0a 58 23 69 6e 63 6c 75 | 64 65 09 3c 73 74 72 69 |.X#inclu|de.<stri|
|00004f60| 6e 67 2e 68 3e 0a 58 23 | 69 6e 63 6c 75 64 65 09 |ng.h>.X#|include.|
|00004f70| 3c 65 72 72 6e 6f 2e 68 | 3e 0a 58 23 69 6e 63 6c |<errno.h|>.X#incl|
|00004f80| 75 64 65 09 3c 75 6e 69 | 73 74 64 2e 68 3e 0a 58 |ude.<uni|std.h>.X|
|00004f90| 23 69 6e 63 6c 75 64 65 | 09 3c 66 63 6e 74 6c 2e |#include|.<fcntl.|
|00004fa0| 68 3e 0a 58 23 69 6e 63 | 6c 75 64 65 09 3c 74 69 |h>.X#inc|lude.<ti|
|00004fb0| 6d 65 2e 68 3e 0a 58 0a | 58 69 6e 74 09 09 6d 61 |me.h>.X.|Xint..ma|
|00004fc0| 69 6e 28 69 6e 74 20 61 | 72 67 63 2c 20 63 68 61 |in(int a|rgc, cha|
|00004fd0| 72 20 2a 2a 61 72 67 76 | 29 0a 58 7b 0a 58 09 63 |r **argv|).X{.X.c|
|00004fe0| 6f 6e 73 74 20 63 68 61 | 72 09 2a 6c 65 64 5f 64 |onst cha|r.*led_d|
|00004ff0| 65 76 69 63 65 20 3d 20 | 22 2f 64 65 76 2f 6c 65 |evice = |"/dev/le|
|00005000| 64 63 6c 6f 63 6b 22 3b | 0a 58 09 73 74 72 75 63 |dclock";|.X.struc|
|00005010| 74 20 74 6d 09 2a 74 6d | 3b 0a 58 09 74 69 6d 65 |t tm.*tm|;.X.time|
|00005020| 5f 74 09 09 6e 6f 77 3b | 09 09 2f 2a 20 63 75 72 |_t..now;|../* cur|
|00005030| 72 65 6e 74 20 55 4e 49 | 58 20 74 69 6d 65 09 09 |rent UNI|X time..|
|00005040| 09 2a 2f 0a 58 09 69 6e | 74 09 09 09 6c 65 64 3b |.*/.X.in|t...led;|
|00005050| 09 09 2f 2a 20 4c 45 44 | 20 64 65 76 69 63 65 09 |../* LED| device.|
|00005060| 09 09 09 09 2a 2f 0a 58 | 09 63 68 61 72 09 09 62 |....*/.X|.char..b|
|00005070| 75 66 5b 34 30 5d 3b 09 | 2f 2a 20 62 75 66 66 65 |uf[40];.|/* buffe|
|00005080| 72 20 66 6f 72 20 74 68 | 65 20 74 69 6d 65 20 73 |r for th|e time s|
|00005090| 74 72 69 6e 67 09 2a 2f | 0a 58 0a 58 09 69 66 20 |tring.*/|.X.X.if |
|000050a0| 28 61 72 67 63 20 3e 20 | 31 29 09 09 2f 2a 20 77 |(argc > |1)../* w|
|000050b0| 65 20 63 61 6e 20 6e 61 | 6d 65 20 6c 65 64 20 64 |e can na|me led d|
|000050c0| 65 76 69 63 65 20 69 66 | 20 77 65 20 77 61 6e 74 |evice if| we want|
|000050d0| 20 2a 2f 0a 58 09 09 6c | 65 64 5f 64 65 76 69 63 | */.X..l|ed_devic|
|000050e0| 65 20 3d 20 61 72 67 76 | 5b 31 5d 3b 0a 58 0a 58 |e = argv|[1];.X.X|
|000050f0| 09 69 66 20 28 28 6c 65 | 64 20 3d 20 6f 70 65 6e |.if ((le|d = open|
|00005100| 28 6c 65 64 5f 64 65 76 | 69 63 65 2c 20 4f 5f 57 |(led_dev|ice, O_W|
|00005110| 52 4f 4e 4c 59 29 29 20 | 3d 3d 20 2d 31 29 0a 58 |RONLY)) |== -1).X|
|00005120| 09 7b 0a 58 09 09 66 70 | 72 69 6e 74 66 28 73 74 |.{.X..fp|rintf(st|
|00005130| 64 65 72 72 2c 20 22 43 | 61 6e 27 74 20 6f 70 65 |derr, "C|an't ope|
|00005140| 6e 20 25 73 20 2d 20 25 | 73 22 2c 20 6c 65 64 5f |n %s - %|s", led_|
|00005150| 64 65 76 69 63 65 2c 20 | 73 74 72 65 72 72 6f 72 |device, |strerror|
|00005160| 28 65 72 72 6e 6f 29 29 | 3b 0a 58 09 09 72 65 74 |(errno))|;.X..ret|
|00005170| 75 72 6e 28 31 29 3b 0a | 58 09 7d 0a 58 0a 58 09 |urn(1);.|X.}.X.X.|
|00005180| 66 6f 72 20 28 3b 3b 29 | 0a 58 09 7b 0a 58 09 09 |for (;;)|.X.{.X..|
|00005190| 74 69 6d 65 28 26 6e 6f | 77 29 3b 0a 58 09 09 74 |time(&no|w);.X..t|
|000051a0| 6d 20 3d 20 6c 6f 63 61 | 6c 74 69 6d 65 28 26 6e |m = loca|ltime(&n|
|000051b0| 6f 77 29 3b 0a 58 0a 58 | 23 69 66 64 65 66 09 43 |ow);.X.X|#ifdef.C|
|000051c0| 4c 4f 43 4b 31 32 0a 58 | 09 09 69 66 20 28 74 6d |LOCK12.X|..if (tm|
|000051d0| 2d 3e 74 6d 5f 68 6f 75 | 72 20 3e 20 31 32 29 0a |->tm_hou|r > 12).|
|000051e0| 58 09 09 09 74 6d 2d 3e | 74 6d 5f 68 6f 75 72 20 |X...tm->|tm_hour |
|000051f0| 2d 3d 20 31 32 3b 0a 58 | 09 09 65 6c 73 65 20 69 |-= 12;.X|..else i|
|00005200| 66 20 28 21 74 6d 2d 3e | 74 6d 5f 68 6f 75 72 29 |f (!tm->|tm_hour)|
|00005210| 0a 58 09 09 09 74 6d 2d | 3e 74 6d 5f 68 6f 75 72 |.X...tm-|>tm_hour|
|00005220| 20 3d 20 31 32 3b 0a 58 | 0a 58 09 09 73 70 72 69 | = 12;.X|.X..spri|
|00005230| 6e 74 66 28 62 75 66 2c | 20 22 25 32 64 3a 25 30 |ntf(buf,| "%2d:%0|
|00005240| 32 64 3a 25 30 32 64 22 | 2c 20 74 6d 2d 3e 74 6d |2d:%02d"|, tm->tm|
|00005250| 5f 68 6f 75 72 2c 20 74 | 6d 2d 3e 74 6d 5f 6d 69 |_hour, t|m->tm_mi|
|00005260| 6e 2c 20 74 6d 2d 3e 74 | 6d 5f 73 65 63 29 3b 0a |n, tm->t|m_sec);.|
|00005270| 58 23 65 6c 73 65 0a 58 | 09 09 73 70 72 69 6e 74 |X#else.X|..sprint|
|00005280| 66 28 62 75 66 2c 20 22 | 25 30 32 64 3a 25 30 32 |f(buf, "|%02d:%02|
|00005290| 64 3a 25 30 32 64 22 2c | 20 74 6d 2d 3e 74 6d 5f |d:%02d",| tm->tm_|
|000052a0| 68 6f 75 72 2c 20 74 6d | 2d 3e 74 6d 5f 6d 69 6e |hour, tm|->tm_min|
|000052b0| 2c 20 74 6d 2d 3e 74 6d | 5f 73 65 63 29 3b 0a 58 |, tm->tm|_sec);.X|
|000052c0| 23 65 6e 64 69 66 0a 58 | 09 09 69 6f 63 74 6c 28 |#endif.X|..ioctl(|
|000052d0| 6c 65 64 2c 20 31 2c 20 | 62 75 66 29 3b 0a 58 09 |led, 1, |buf);.X.|
|000052e0| 09 73 6c 65 65 70 28 31 | 29 3b 0a 58 09 7d 0a 58 |.sleep(1|);.X.}.X|
|000052f0| 7d 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |}.END_OF|_FILE.if|
|00005300| 20 74 65 73 74 20 31 35 | 30 39 20 2d 6e 65 20 60 | test 15|09 -ne `|
|00005310| 77 63 20 2d 63 20 3c 27 | 6c 65 64 74 69 6d 65 2e |wc -c <'|ledtime.|
|00005320| 63 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |c'`; the|n. ec|
|00005330| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 6c 65 64 74 |ho shar:| \"'ledt|
|00005340| 69 6d 65 2e 63 27 5c 22 | 20 75 6e 70 61 63 6b 65 |ime.c'\"| unpacke|
|00005350| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00005360| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00005370| 6c 65 64 74 69 6d 65 2e | 63 27 0a 66 69 0a 65 63 |ledtime.|c'.fi.ec|
|00005380| 68 6f 20 73 68 61 72 3a | 20 45 6e 64 20 6f 66 20 |ho shar:| End of |
|00005390| 61 72 63 68 69 76 65 20 | 31 20 5c 28 6f 66 20 31 |archive |1 \(of 1|
|000053a0| 5c 29 2e 0a 63 70 20 2f | 64 65 76 2f 6e 75 6c 6c |\)..cp /|dev/null|
|000053b0| 20 61 72 6b 31 69 73 64 | 6f 6e 65 0a 4d 49 53 53 | ark1isd|one.MISS|
|000053c0| 49 4e 47 3d 22 22 0a 66 | 6f 72 20 49 20 69 6e 20 |ING="".f|or I in |
|000053d0| 31 20 3b 20 64 6f 0a 20 | 20 20 20 69 66 20 74 65 |1 ; do. | if te|
|000053e0| 73 74 20 21 20 2d 66 20 | 61 72 6b 24 7b 49 7d 69 |st ! -f |ark${I}i|
|000053f0| 73 64 6f 6e 65 20 3b 20 | 74 68 65 6e 0a 09 4d 49 |sdone ; |then..MI|
|00005400| 53 53 49 4e 47 3d 22 24 | 7b 4d 49 53 53 49 4e 47 |SSING="$|{MISSING|
|00005410| 7d 20 24 7b 49 7d 22 0a | 20 20 20 20 66 69 0a 64 |} ${I}".| fi.d|
|00005420| 6f 6e 65 0a 69 66 20 74 | 65 73 74 20 22 24 7b 4d |one.if t|est "${M|
|00005430| 49 53 53 49 4e 47 7d 22 | 20 3d 20 22 22 20 3b 20 |ISSING}"| = "" ; |
|00005440| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 59 6f |then. | echo Yo|
|00005450| 75 20 68 61 76 65 20 74 | 68 65 20 61 72 63 68 69 |u have t|he archi|
|00005460| 76 65 2e 0a 20 20 20 20 | 72 6d 20 2d 66 20 61 72 |ve.. |rm -f ar|
|00005470| 6b 5b 31 2d 39 5d 69 73 | 64 6f 6e 65 0a 65 6c 73 |k[1-9]is|done.els|
|00005480| 65 0a 20 20 20 20 65 63 | 68 6f 20 59 6f 75 20 73 |e. ec|ho You s|
|00005490| 74 69 6c 6c 20 6e 65 65 | 64 20 74 6f 20 75 6e 70 |till nee|d to unp|
|000054a0| 61 63 6b 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ack the |followin|
|000054b0| 67 20 61 72 63 68 69 76 | 65 73 3a 0a 20 20 20 20 |g archiv|es:. |
|000054c0| 65 63 68 6f 20 22 20 20 | 20 20 20 20 20 20 22 20 |echo " | " |
|000054d0| 24 7b 4d 49 53 53 49 4e | 47 7d 0a 66 69 0a 23 23 |${MISSIN|G}.fi.##|
|000054e0| 20 20 45 6e 64 20 6f 66 | 20 73 68 65 6c 6c 20 61 | End of| shell a|
|000054f0| 72 63 68 69 76 65 2e 0a | 65 78 69 74 20 30 0a |rchive..|exit 0. |
+--------+-------------------------+-------------------------+--------+--------+