ioctl MEDIA_IOC_ENUM_ENTITIES
&manvol;
MEDIA_IOC_ENUM_ENTITIESEnumerate entities and their propertiesint ioctlint fdint requeststruct media_entity_desc *argpArgumentsfdFile descriptor returned by
open().requestMEDIA_IOC_ENUM_ENTITIESargpDescriptionTo query the attributes of an entity, applications set the id field
of a &media-entity-desc; structure and call the MEDIA_IOC_ENUM_ENTITIES
ioctl with a pointer to this structure. The driver fills the rest of the
structure or returns an &EINVAL; when the id is invalid.Entities can be enumerated by or'ing the id with the
MEDIA_ENT_ID_FLAG_NEXT flag. The driver will return
information about the entity with the smallest id strictly larger than the
requested one ('next entity'), or the &EINVAL; if there is none.Entity IDs can be non-contiguous. Applications must
not try to enumerate entities by calling
MEDIA_IOC_ENUM_ENTITIES with increasing id's until they get an error.
struct media_entity_desc__u32idEntity id, set by the application. When the id is or'ed with
MEDIA_ENT_ID_FLAG_NEXT, the driver clears the
flag and returns the first entity with a larger id.charname[32]Entity name as an UTF-8 NULL-terminated string.__u32typeEntity type, see for details.__u32revisionEntity revision. Always zero (obsolete)__u32flagsEntity flags, see for details.__u32group_idEntity group ID. Always zero (obsolete)__u16padsNumber of pads__u16linksTotal number of outbound links. Inbound links are not counted
in this field.unionstructdevValid for (sub-)devices that create a single device node.__u32majorDevice node major number.__u32minorDevice node minor number.__u8raw[184]
&return-value;
EINVALThe &media-entity-desc; id references
a non-existing entity.