i2c-dev.h
Kyosti took 173 lines out of i2c-dev.h in the main i2c branch because userspace shouldn't include kernel headers, and then merged that change into the lk2-4 branch too.
But I don't recall seeing any replacement.
Is there one?
Should we undo the changes so we have working userspace utilities again or should we create a userspace version of i2c-dev.h?
I'm not claiming the old i2c-dev.h was pretty but we need something.
Quoted 9 lines · Mark D. Studebaker
Kyosti took 173 lines out of
i2c-dev.hin the main i2c branch because userspace shouldn't include kernel headers, and then merged that change into the lk2-4 branch too.But I don't recall seeing any replacement.
Is there one?
Should we undo the changes so we have working userspace utilities again or should we create a userspace version ofi2c-dev.h?
Create a userspace version, that includes the changes I made to it for the most recent 2.4 and 2.5 kernels :)
thanks,
greg k-h
Quoted 4 lines · Philip Pokorny
So '- km' in the
sensors.hcomments must be Kyosti...There has got to be some common header files between kernel and user space so that data structures and "magic" constants are shared.
No, two separate header files, both kept in sync. That's the way to do this today.
Quoted 2 lines
If user space can't include kernel headers, then the kernel will have to include a "user space" header.
Nope, see the many threads on the linux-kernel mailing list about this issue.
Quoted 2 lines
It would seem to me that the alternative of having two copies of the same data structures and constants would be worse.
Nope.
Quoted 1 line
When did this become such a big issue?
Always has been :)
Quoted 2 lines
Absolutely, either put the old code back or create another file with the common code that can be included one place or the other...
So does this mean that the drivers/i2c/* files in the 2.4 tree are out of date with the cvs versions? If so, I have some changes that are now in 2.4 that need to be put into the cvs tree...
Also, any reason not to update the in-tree 2.4 kernel versions?
thanks,
greg k-h
Quoted 8 lines · Philip Pokorny
Quoted 7 lines · Greg KH
Quoted 4 lines · Philip Pokorny
So '- km' in the
sensors.hcomments must be Kyosti...There has got to be some common header files between kernel and user space so that data structures and "magic" constants are shared.
Quoted 6 lines
Quoted 2 lines
No, two separate header files, both kept in sync. That's the way to do this today.
How are they kept in sync. Force of will? Without some automatic way to keep them in sync you've just exchanged one set of problems for another...
Right now, you are correct. Force of will is all we got :)
Quoted 10 lines
Quoted 6 lines
Quoted 3 lines
If user space can't include kernel headers, then the kernel will have to include a "user space" header.
Nope, see the many threads on the linux-kernel mailing list about this issue.
OK. So H Peter Anvin suggested something very like what I'm suggesting here:
Quoted 7 lines
Google doesn't seem to turn up much else on the linux.kernel mailing list other than "IOCTL's are bad" comments (and the variations that boil down to "BINARY interfaces are bad") I would view this as supporting my position that it's annoying (and has been for a long time), but not worse than the alternatives and not so annoying as to require fixing.
For 2.5/2.6 someone could step up to the plate and do the work right now. Otherwise this is going to be a 2.7 thing.
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
It would seem to me that the alternative of having two copies of the same data structures and constants would be worse.
Nope.
So we disagree...
Heh, I understand, but the only way that we are allowed to do this is to keep two copies. Well, you can have one in the cvs tree, and there will be one in the main kernel source tree.
And yes, ioctls are bad :)
thanks,
greg k-h
I found the userspace version, Kyosti added all that was needed to kernel/include/i2c-dev.h in the sensors package.
So he didn't leave us hanging after all.
I'm fixing prog/eepromer/*.c and the Makefile to find that version.
Quoted 19 lines · Greg KH
Quoted 9 lines · Mark D. Studebaker
Kyosti took 173 lines out of
i2c-dev.hin the main i2c branch because userspace shouldn't include kernel headers, and then merged that change into the lk2-4 branch too.But I don't recall seeing any replacement.
Is there one?
Should we undo the changes so we have working userspace utilities again or should we create a userspace version ofi2c-dev.h?Create a userspace version, that includes the changes I made to it for the most recent 2.4 and 2.5 kernels :)
thanks,
greg k-h
So '- km' in the sensors.h comments must be Kyosti...
There has got to be some common header files between kernel and user space so that data structures and "magic" constants are shared.
If user space can't include kernel headers, then the kernel will have to include a "user space" header.
It would seem to me that the alternative of having two copies of the same data structures and constants would be worse.
When did this become such a big issue?
Absolutely, either put the old code back or create another file with the common code that can be included one place or the other...
:v)
Quoted 12 lines · Mark D. Studebaker
Kyosti took 173 lines out of
i2c-dev.hin the main i2c branch because userspace shouldn't include kernel headers, and then merged that change into the lk2-4 branch too.But I don't recall seeing any replacement.
Is there one?
Should we undo the changes so we have working userspace utilities again or should we create a userspace version ofi2c-dev.h?I'm not claiming the old
i2c-dev.hwas pretty but we need something.
Quoted 9 lines · Greg KH
Quoted 4 lines · Philip Pokorny
So '- km' in the
sensors.hcomments must be Kyosti...There has got to be some common header files between kernel and user space so that data structures and "magic" constants are shared.
No, two separate header files, both kept in sync. That's the way to do this today.
How are they kept in sync. Force of will? Without some automatic way to keep them in sync you've just exchanged one set of problems for another...
Quoted 5 lines
Quoted 2 lines
If user space can't include kernel headers, then the kernel will have to include a "user space" header.
Nope, see the many threads on the linux-kernel mailing list about this issue.
OK. So H Peter Anvin suggested something very like what I'm suggesting here:
Google doesn't seem to turn up much else on the linux.kernel mailing list other than "IOCTL's are bad" comments (and the variations that boil down to "BINARY interfaces are bad") I would view this as supporting my position that it's annoying (and has been for a long time), but not worse than the alternatives and not so annoying as to require fixing.
Quoted 4 lines
Quoted 2 lines
It would seem to me that the alternative of having two copies of the same data structures and constants would be worse.
Nope.
So we disagree...
:v)
Signature · 4 lines
Philip Pokorny, Director of Engineering Tel: 415-358-2635 Fax: 415-358-2646 Toll Free: 888-PENGUIN PENGUIN COMPUTING, INC. www.penguincomputing.com
Hi all,
Why is it that there are two different i2c-dev.h files, one in i2c and one in lm_sensors2? When installing i2c and lm_sensors2 in order, the version from lm_sensors2 will of course overwrite the one from i2c. This causes trouble to people using e.g. checkinstall to build packages from sources (because i2c and lm_sensors packages then conflict on that file).
It seems to me that the file that comes with i2c is meant for "internal" use only and should not be "exported" to any user-space include directory (and could maybe even be integrated into i2c-dev.c). Am I right?
Thanks.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
Quoted 4 lines
they used to be one but got separated because of the rule "userspace programs should not include kernel headers". Perhaps the i2c (i.e. kernel) version shouldn't be installed under
/usr/local/...
Agreed, will do.
Signature · 2 lines
Jean Delvare http://khali.linux-fr.org/
they used to be one but got separated because of the rule
"userspace programs should not include kernel headers".
Perhaps the i2c (i.e. kernel) version shouldn't be installed under /usr/local/...
Quoted 16 lines · Jean Delvare
Hi all,
Why is it that there are two different
i2c-dev.hfiles, one in i2c and one inlm_sensors2? When installing i2c andlm_sensors2in order, the version fromlm_sensors2will of course overwrite the one from i2c. This causes trouble to people using e.g. checkinstall to build packages from sources (because i2c andlm_sensorspackages then conflict on that file).It seems to me that the file that comes with i2c is meant for "internal" use only and should not be "exported" to any user-space include directory (and could maybe even be integrated into
i2c-dev.c). Am I right?Thanks.