Messages in this thread | | | Date | Sat, 31 Jul 1999 09:01:19 -0400 (EDT) | From | Alexander Viro <> | Subject | [CFT][PATCH] procfs cleanups - round 4 |
| |
Folks, please help to test this one. It touches a lot of places and while I think that I've caught all stupid typos... well, I can be wrong. Please, try it with different configs and see if something in /proc will break. Patch (against 2.3.13-pre1) lives on ftp://ftp.math.psu.edu/pub/viro/proc-patch-12.gz Description: * /proc/h8 and proc/net/bmac didn't release their entries upon rmmod. Result: oopsen. Fixed. * /proc/net/raw6 and /proc/net/udp6 shared the inumber. Fixed. * rmmod ax25 released /proc/net/ax25_route twice. Fixed. * symbolectomy: proc_net_file_operations is no more. Rationale: it's identical to proc_file_file_operations, which is what proc_register defaults to. So proc_net_file_operations in the intializers had been replaced with NULL. * new functions: create_proc_info_entry(name, mode, base, get_info) creates an entry with given name and mode under the directory base and sets ->get_info() method. mode defaults to S_IFREG|S_IRUSR. base defaults to root of procfs. create_proc_read_entry(name, mode, base, read_proc, data) same as above, but sets ->read_proc() and ->data. proc_net_create(name, mode, get_info) same as create_proc_info_entry, uses /proc/net and base; the most common case in net/*/*.c proc_net_remove(name) removes name from /proc/net * lots of places switched from explicit calls of proc_{un}register() to those functions. Rationale: cleanus up a lot of mess, reduces the number of places that have to know proc_dir_entry layout. * proc_array_file_operations are used only for per-process stuff. Old system-wide stuff that used to use it moved to generic scheme. Rationale: those entries were the last remnants of old scheme and they gave a lot of unneeded ad-hackery. They are not different from /proc/net/ stuff, etc. And their initialization gave a lot of clutter in fs/proc/root.c * fs/proc/net.c is no more. It was dead since 2.1.21, time to bury it. * fs/proc/array.c is only for per-process stuff now. The rest had been moved to fs/proc/proc_misc.c, together with the initialization. * proc_root_fs, proc_mca and proc_sys_root became pointers. Rationale: no reason to keep them static; other /proc subdirectories are dynamic now. * Most of the stuff in procfs doesn't have fixed inumbers now. Exceptions: SCSI stuff, MCA stuff and PROC_NET_IP_MASQ_APP (the latter can go right now, the rest is slightly trickier) + per-process stuff.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |