Repository navigation
Report display and input nodes, answer DMDRVI_IOCTL_DEVFS_GET_FRIEND - #67
Merged
Merged
Conversation
Besides "monitor" and "block", dmdevfs now probes every node with the standard dmdrvi graphics and input ioctls and reports it to libsystemd as - "display": the driver answers DMDRVI_IOCTL_GFX_GET_INFO - e.g. for a dmview@<name> service per display; - "input": the driver answers DMDRVI_IOCTL_INPUT_GET_INFO - touch panels, mice, buttons. Every display or input driver implementing the standard ioctls gets its services started by device rules without reporting anything itself. report= accepts "display" and "input" too. The class names move to the public dmdevfs.h (DMDEVFS_CLASS_*). DMDRVI_IOCTL_DEVFS_GET_FRIEND (dmdrvi 2.4) on an open node is answered by dmdevfs itself, never by the driver: the index-th other member of the node's friends_group (absolute path, friend_role). This is what drivers get through dmdrvi_friend_changed(), for every module - e.g. a display service finding the touch panel of its display, without depending on the dmdevfs module. Tests: the test driver answers the new ioctls when configured with display=true / input=true; new steps check that display and input nodes start dsp@/inp@ units only under their own class, that report= limits them, that unmounting stops them, and the friends lookup. Requires dmdrvi 2.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The answer is written straight into the buffers the caller passes in dmdrvi_devfs_friend_t - no path_t or other fixed-size buffer of dmdevfs in between. The lengths are always filled in; NULL or too small buffers give -ERANGE, so callers can ask for the lengths first. Nothing is logged under g_devfs_mutex. Tests cover asking for the lengths only, an exactly fitting buffer and a buffer one byte short. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Besides "monitor" and "block", dmdevfs now probes every node with the standard dmdrvi graphics and input ioctls and reports it to libsystemd as
Every display or input driver implementing the standard ioctls gets its services started by device rules without reporting anything itself. report= accepts "display" and "input" too. The class names move to the public dmdevfs.h (DMDEVFS_CLASS_*).
DMDRVI_IOCTL_DEVFS_GET_FRIEND (dmdrvi 2.4) on an open node is answered by dmdevfs itself, never by the driver: the index-th other member of the node's friends_group (absolute path, friend_role). This is what drivers get through dmdrvi_friend_changed(), for every module - e.g. a display service finding the touch panel of its display, without depending on the dmdevfs module.
Tests: the test driver answers the new ioctls when configured with display=true / input=true; new steps check that display and input nodes start dsp@/inp@ units only under their own class, that report= limits them, that unmounting stops them, and the friends lookup.
Requires dmdrvi 2.4.