header files installed by i2c
Hi all,
I can see that i2c install many headers in /usr/local/include/linux. All these are *kernel* headers. As I understand it, they are useless for user-space applications and should not be copied there. Any objection to me removing their export from i2c/kernel/Module.mk?
Thanks,
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Hi Jean:
Quoted 4 lines · Jean Delvare
I can see that i2c install many headers in
/usr/local/include/linux. All these are *kernel* headers. As I understand it, they are useless for user-space applications and should not be copied there. Any objection to me removing their export fromi2c/kernel/Module.mk?
At least i2c-dev.h and maybe parts of i2c.h are needed for userspace access to the i2c /dev interface. What we probably should do is provide sanitized headers for that. There might be other files that are legitimate parts of the userspace API too, I haven't looked closely.
Regards,
Signature · 2 lines
Mark M. Hoffman [email protected]
Hi Mark,
Quoted 4 lines
At least
i2c-dev.hand maybe parts ofi2c.hare needed for userspace access to the i2c /dev interface. What we probably should do is provide sanitized headers for that. There might be other files that are legitimate parts of the userspace API too, I haven't looked closely.
i2c-dev.h was already sanitized and there are now two different versions of that file, the kernel-space one (small) is in i2c and the user-space one (large) is in lm_sensors (with no good reason to that IMHO). User-space tools in the lm_sensors package only use i2c-dev.h (the user-space one), not i2c.h. The user-space version of i2c-dev.h does include all constants from i2c.h, so i2c-dev.h looks sufficient for user-space programs (despite what our own documentation says).
I will remove all kernel header includes from i2c, as it sounds like the right thing to do. If someone complains we'll see what needs to be done.
I also believe that the user-space i2c-dev.h should be part of i2c, not lm_sensors. Don't know where to move it though, since we don't really have a location for user-space header files at the moment.
Thanks,
--
Jean Delvare