lkml.org 
[lkml]   [1996]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectSample loadable kernel module, something about animals :)
Hi All,

I've done a general revamp of the kernel animal driver, and the result is
the enclosed `totem' driver, which compiles completely outside the kernel
source tree and runs nicely under pre2.0.10. I'm enclosing it purely to
provide a demonstration application which will help shed light on how to
create simple kernel modules providing status files in the proc filesystem.

Yeah, right. ;)


lilo

begin 664 totem.c.gz
M'XL(`+U9LC$"`ZU9^W/4.!+^.?DKM+E:9@9F\MB[8Q="J`(2(+M`N"0L=:\*
M&ELS%F-+/LF.&7;YW^_KEOP8"$7MU57Q&,M2J_OK=WOO]K:XO5792A7B^F!W
M?_>'J1@G$Y'KW$[%P;U[=Z="YKEP>IE57CCEE;M6Z2Y.T<'+3'N1.GVMG&BD
M%XW35:6,*&NG\K7`BC1"?9!%F2MA%T(*K_EW8=,ZETY_5"G1B212Y?72J%14
M5MBZ*NM*^$I6M1?:+*PK9*6M$==:@M!"@XPVHLJ4<-963$8[E536K>DN>E$Z
MF_!.O_80<5>(4R.,!:]KX3-9@BDGB+*`')II%$J:BAB8XZ51@9+U"IS4I4Z!
M3%7E3'GI9.'Q4F*[7"DOZA(`R3Q0*8@-:5+\-7;M1:DL"=YD%D>T686#ME0.
M4IFE"!P",*>(`'#6%H(GUB3*&<^DDDSGJ0.^/K-UGD*2BMB$@FP34"MSN6Z5
M<TXZFT(]2A8095?<GPS5ICU#9%0S%5"*L]"K6.$NE>,R7<@\:A:H/4I6QC:Y
M2I>J4`:&4%FB\\B`>"-.?$8@,CF=*CD5/UL0>2G]1[GJWQA=:1!E`R`JK$TB
MLW"V`#`ZR<2I<'6505\>YN,KFZLI'_:0,%_/G'I?7RL3$+,FUU#0+\PRT7DN
M$_#O1^)9#38$X,VJJKR_M]<TS:Y3*0#?36QQ_Z?]G_;WGJ\!_2O5^+VEJO96
MV7(WJPHF0PP/S-9G"@[P%>.-$$U9/6"4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