diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/config.c b/config/config.c index 760cf193a..088bd5ac2 100644 --- a/config/config.c +++ b/config/config.c @@ -145,6 +145,18 @@ config_odev_free_attribute_list(struct OdevAttributes *attribs) free(attribs); } +static struct OdevAttribute * +config_odev_find_attribute(struct OdevAttributes *attribs, int attrib_id) +{ + struct OdevAttribute *oa; + + xorg_list_for_each_entry(oa, &attribs->list, member) { + if (oa->attrib_id == attrib_id) + return oa; + } + return NULL; +} + Bool config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, const char *attrib_name) @@ -161,6 +173,18 @@ config_odev_add_attribute(struct OdevAttributes *attribs, int attrib, return TRUE; } +char * +config_odev_get_attribute(struct OdevAttributes *attribs, int attrib_id) +{ + struct OdevAttribute *oa; + + oa = config_odev_find_attribute(attribs, attrib_id); + if (!oa) + return NULL; + + return oa->attrib_name; +} + void config_odev_free_attributes(struct OdevAttributes *attribs) { |