/proc

Duan Zhenhai (ccdzh@shoukui.pku.edu.cn)
Wed, 15 Jan 1997 10:33:15 +0800 (GMT+0800)


I had read the source code of some Linux kernel. I think I
should handle these things if I want to use /proc.

1. In the <proc_fs.h>, define a id constant, say,
#define MY_TEST Constant_X
2. In the linux/fs/proc/XXX.c, Insert one Item

{MY_TEST, 4, "test"}
and add one CASE switch

case MY_TEST:
my_function(..);
3. In my driver implementing the my_function().

Is that right?

Thank you!

//////////////////////////////////////////////////////////////////
Duan Zhenhai
Room 1105,BLDG.47
ccdzh@pku.edu.cn Peking University
Beijing 100871
P.R.China
URL: http://shoukui.pku.edu.cn/duan