-
Lyude Paul authored
In order to add rust bindings for the various DRM_MODE_CONNECTOR_* type IDs, we need a way to know the range of defined connector types - since each type corresponds to an actual array entry in drm_connector_enum_list. So, let's make this easy to figure out by adding a new _DRM_MODE_CONNECTOR_COUNT macro that always matches the number of available connector type IDs. Also, use that macro to define the size of drm_connector_enum_list to ensure that builds fail if someone attempts to add a new entry to drm_connector_enum_list without updating this macro. Signed-off-by:
Lyude Paul <lyude@redhat.com>
Lyude Paul authoredIn order to add rust bindings for the various DRM_MODE_CONNECTOR_* type IDs, we need a way to know the range of defined connector types - since each type corresponds to an actual array entry in drm_connector_enum_list. So, let's make this easy to figure out by adding a new _DRM_MODE_CONNECTOR_COUNT macro that always matches the number of available connector type IDs. Also, use that macro to define the size of drm_connector_enum_list to ensure that builds fail if someone attempts to add a new entry to drm_connector_enum_list without updating this macro. Signed-off-by:
Lyude Paul <lyude@redhat.com>