Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
hwlocality_info_attr(3)     Library Functions Manual	 hwlocality_info_attr(3)

NAME
     hwlocality_info_attr - Consulting and Adding Info Attributes

SYNOPSIS
   Functions
     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)
     int  hwloc_obj_set_subtype  (hwloc_topology_t  topology,  hwloc_obj_t  obj,
	 const char *subtype)

Detailed Description
Function Documentation
   int	hwloc_obj_add_info  (hwloc_obj_t  obj,	const  char * name, const char *
     value)
     Add the given name and value pair to the given object info attributes.  The
     info  pair is appended to the existing info array even if another pair with
     the same name already exists.

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

     Returns
	 0 on success, -1 on error.

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

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

   const  char * hwloc_obj_get_info_by_name (hwloc_obj_t obj, const char * name)
     [inline]
     Search the given name in object infos and return the  corresponding  value.
     If multiple info attributes match the given name, only the first one is re-
     turned.

     Returns
	 A pointer to the value string if it exists.

	 NULL if no such info attribute exists.

     Note
	 The  string  should not be freed by the caller, it belongs to the hwloc
	 library.

   int hwloc_obj_set_subtype (hwloc_topology_t topology, hwloc_obj_t obj,  const
     char * subtype)
     Set  (or replace) the subtype of an object. The given subtype is copied in-
     ternally, the caller is responsible for freeing  the  original  subtype  if
     needed.

     If another subtype already exists in object, it is replaced. The given sub-
     type may be NULL to remove the existing subtype.

     Note
	 This  function  is mostly meant to initialize the subtype of user-added
	 objects such as groups with hwloc_topology_alloc_group_object().

     Returns
	 0 on success.

	 -1 with errno set to ENOMEM on failure to allocate memory.

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

Hardware Locality (hwloc)	 Version 2.12.1 	 hwlocality_info_attr(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=hwlocality_info_attr&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help