mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
xfree86: Make driver matching consistent
Most of the driver enumeration functions take an array and a maximum number of entries that they are allowed to fill in. Upon success, they return the number of entries filled in. This allows them to be easily used to consecutively. One exception is the xf86MatchDriverFromFiles() function, which doesn't return a value, so callers have to manually search the array for the first empty entry. This commit modifies the xf86MatchDriverFromFiles() to behave the same way as others, which makes it easier to deal with. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Tested-By: Aaron Plattner <aplattner@nvidia.com> Tested-by: Rob Clark <robdclark@gmail.com> (on arm / platform device) Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
a61ca6f006
commit
5a4e15c3f6
4 changed files with 16 additions and 22 deletions
|
|
@ -265,7 +265,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches)
|
|||
#endif
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
if (i < (nmatches - 1))
|
||||
i = xf86PciMatchDriver(matches, nmatches);
|
||||
i += xf86PciMatchDriver(&matches[i], nmatches - i);
|
||||
#endif
|
||||
|
||||
#if defined(__linux__)
|
||||
|
|
|
|||
Loading…
Reference in a new issue