11/*
22 * Copyright © 2009 CNRS
3- * Copyright © 2009-2022 Inria. All rights reserved.
3+ * Copyright © 2009-2023 Inria. All rights reserved.
44 * Copyright © 2009-2010 Université Bordeaux
55 * Copyright © 2009-2018 Cisco Systems, Inc. All rights reserved.
66 * See COPYING in top-level directory.
@@ -86,7 +86,7 @@ void hwloc_add_uname_info(struct hwloc_topology *topology __hwloc_attribute_unus
8686#ifdef HAVE_UNAME
8787 struct utsname _utsname , * utsname ;
8888
89- if (hwloc_obj_get_info_by_name ( topology -> levels [ 0 ][ 0 ] , "OSName" ))
89+ if (hwloc_get_info_by_name ( & topology -> infos , "OSName" ))
9090 /* don't annotate twice */
9191 return ;
9292
@@ -99,15 +99,15 @@ void hwloc_add_uname_info(struct hwloc_topology *topology __hwloc_attribute_unus
9999 }
100100
101101 if (* utsname -> sysname )
102- hwloc_obj_add_info ( topology -> levels [ 0 ][ 0 ] , "OSName" , utsname -> sysname );
102+ hwloc__add_info ( & topology -> infos , "OSName" , utsname -> sysname );
103103 if (* utsname -> release )
104- hwloc_obj_add_info ( topology -> levels [ 0 ][ 0 ] , "OSRelease" , utsname -> release );
104+ hwloc__add_info ( & topology -> infos , "OSRelease" , utsname -> release );
105105 if (* utsname -> version )
106- hwloc_obj_add_info ( topology -> levels [ 0 ][ 0 ] , "OSVersion" , utsname -> version );
106+ hwloc__add_info ( & topology -> infos , "OSVersion" , utsname -> version );
107107 if (* utsname -> nodename )
108- hwloc_obj_add_info ( topology -> levels [ 0 ][ 0 ] , "HostName" , utsname -> nodename );
108+ hwloc__add_info ( & topology -> infos , "HostName" , utsname -> nodename );
109109 if (* utsname -> machine )
110- hwloc_obj_add_info ( topology -> levels [ 0 ][ 0 ] , "Architecture" , utsname -> machine );
110+ hwloc__add_info ( & topology -> infos , "Architecture" , utsname -> machine );
111111#endif /* HAVE_UNAME */
112112}
113113
0 commit comments