Page MenuHomeFreeBSD

devel/evdev: Forward to dev/evdev headers where possible
Needs ReviewPublic

Authored by arichardson on Jan 18 2024, 6:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 26, 12:43 PM
Unknown Object (File)
Fri, Apr 26, 3:02 AM
Unknown Object (File)
Thu, Apr 25, 10:57 PM
Unknown Object (File)
Jan 28 2024, 4:56 PM
Unknown Object (File)
Jan 18 2024, 7:15 PM
Subscribers

Details

Reviewers
adridg
manu
wulf
Summary

Instead of downloading the linux headers, use the system-provided evdev headers
instead where possible. We don't have a compatible joystick.h, but the other
three headers should be compatible.

Test Plan

Installed headers look correct.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 55480
Build 52369: arc lint + arc unit

Event Timeline

It is desirable for ports to have up to date version of input-event-codes.h, so it should be downloaded from upstream rather than bundled with OS.

input-event-codes.h hasn't changedu pstream in 4 years (perhaps "of course" because it's a tagged release) but if wulf@ says that that one should be obtained upstream, then that seems reasonable. There's no meaningful difference between the base-system-provided version and upstream that I can see -- it's all defines of constants. One concern I have is that we stopped using base-system headers at some point -- at least that's how I remember it -- because the dev/evdev/ headers were not meant for user-space consumption. I can't find that in ports commit history, though, so maybe I'm dreaming it.

input-event-codes.h hasn't changedu pstream in 4 years (perhaps "of course" because it's a tagged release) but if wulf@ says that that one should be obtained upstream, then that seems reasonable. There's no meaningful difference between the base-system-provided version and upstream that I can see -- it's all defines of constants. One concern I have is that we stopped using base-system headers at some point -- at least that's how I remember it -- because the dev/evdev/ headers were not meant for user-space consumption. I can't find that in ports commit history, though, so maybe I'm dreaming it.

Considering the macro used in those headers are actually consumed by the kernel and define ioctls, shouldn't we make sure that the value match what the kernel assumes rather than relying on the fact that they probably match the linux values? I'd rather have a compilation failure than a runtime failure because some new ioctl was assumed to be supported?

For example the linux joystick.h defines a bunch of ioctls that I don't see implemented on FreeBSD, so we really shouldn't claim support for it? Maybe the header should only includes the constants?

For example the linux joystick.h defines a bunch of ioctls that I don't see implemented on FreeBSD, so we really shouldn't claim support for it? Maybe the header should only includes the constants?

Probably joystick support is provided by webcamd