File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ hwloc_calc_parse_level_filter(hwloc_topology_t topology __hwloc_attribute_unused
203
203
return -1 ;
204
204
}
205
205
206
- } else if ( level -> type != HWLOC_OBJ_OS_DEVICE ) {
206
+ } else {
207
207
fprintf (stderr , "invalid filter specification %s\n" , filter );
208
208
return -1 ;
209
209
}
@@ -241,11 +241,14 @@ hwloc_calc_parse_level(struct hwloc_calc_location_context_s *lcontext,
241
241
|| level -> depth == HWLOC_TYPE_DEPTH_MULTIPLE )
242
242
return -1 ;
243
243
244
- bracket = strchr (typestring , '[' );
245
- if (bracket ) {
246
- err = hwloc_calc_parse_level_filter (topology , bracket + 1 , level );
247
- if (err < 0 )
248
- return -1 ;
244
+ if (level -> type != HWLOC_OBJ_OS_DEVICE || hwloc_strncasecmp (typestring , "os" , 2 ) || !level -> attr .osdev .type ) {
245
+ /* don't use filters for OSdev if it was already parsed as "OS*[osdev.type]" */
246
+ bracket = strchr (typestring , '[' );
247
+ if (bracket ) {
248
+ err = hwloc_calc_parse_level_filter (topology , bracket + 1 , level );
249
+ if (err < 0 )
250
+ return -1 ;
251
+ }
249
252
}
250
253
return 0 ;
251
254
}
You can’t perform that action at this time.
0 commit comments