hwlocality_info_attr - Man Page

Consulting and Adding Key-Value Info Attributes



static const char * hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char *name)
int hwloc_obj_add_info (hwloc_obj_t obj, const char *name, const char *value)

Detailed Description

Function Documentation

int hwloc_obj_add_info (hwloc_obj_t obj, const char * name, const char * value)

Add the given info name and value pair to the given object. The info is appended to the existing info array even if another key with the same name already exists.

The input strings are copied before being added in the object infos.


0 on success, -1 on error.


This function may be used to enforce object colors in the lstopo graphical output by using 'lstopoStyle' as a name and 'Background=#rrggbb' as a value. See CUSTOM COLORS in the lstopo(1) manpage for details.

If value contains some non-printable characters, they will be dropped when exporting to XML, see hwloc_topology_export_xml() in hwloc/export.h.

static const char* hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char * name) [inline], [static]

Search the given key name in object infos and return the corresponding value. If multiple keys match the given name, only the first one is returned.


NULL if no such key exists.


Generated automatically by Doxygen for Hardware Locality (hwloc) from the source code.

Referenced By

The man pages hwloc_obj_add_info(3) and hwloc_obj_get_info_by_name(3) are aliases of hwlocality_info_attr(3).

Thu Feb 11 2021 Version 2.4.1 Hardware Locality (hwloc)