Skip to content

Allow autoprobe function to create more than one device.

Mateo de Mayo requested to merge mateosss/monado:mateosss/autoprobe-many into master

Implements a similar idea already present in xrt_prober->found with out_xdevs for returning more than one device.

While the commit changes many files the important ones are:

  • xrt_prober.h: Change lelo_dallas_autoprobe signature.
  • p_prober.c: Implements similar code to add_from_devices.
  • drivers/: The rest of the files are just minimal updates for each driver that implements an autoprober.

Some notes:

  1. The comment above target_entry_list in target_lists.c mentions that found can return negative values in case of error, and while negative values are not causing any different behaviors from just returning 0 they might in the future. Should I add the same idea for lelo_dallas_autoprober? Right now it just mentions a return value of 0 or greater. In that case, should this MR propose error codes for the modified drivers as well? Currently, they return 0 wherever they returned NULL before.

  2. I added a @note to The Fifth Element reference of lelo_dallas_autoprobe for future readers, but I can remove it if you see fit.

Merge request reports