tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: compat code function pointers



On Mar 19, 10:06am, martin%duskware.de@localhost (Martin Husemann) wrote:
-- Subject: Re: compat code function pointers

| On Sun, Mar 18, 2018 at 09:00:06PM -0400, Christos Zoulas wrote:
| > The question came up where to store the function pointers for device
| > drivers that are not always present in the kernel.
| 
| Is that for pseudo devices and compat ioctl handling?
| 
| I wonder if an indirect aproach would be better:
| 
| Call something like:
| 
|   bool
|   dev_register_compat(compat_code_func_t *new_fp, enum COMPAT_FP_TYPE typ);
| 
| and
| 
|   bool
|   dev_unregister_compat(compat_code_func_t *new_fp, enum COMPAT_FP_TYPE typ);
| 
| 
| and then go over alldevs (or whatever), or have a special list where devices
| supporting some compat register themselves.

That's a good idea, but it is more complicated that what we do now, and does
not solve the problem for things like NTP or COMPAT_BSDPTY or SYSV_*.

christos


Home | Main Index | Thread Index | Old Index