Project

General

Profile

Actions

Bug #8954

closed

libtopo cannot handle any array type other than string_array.

Added by Ben Sims almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
2018-01-08
Due date:
2018-01-08
% Done:

100%

Estimated time:
1.00 h
Difficulty:
Medium
Tags:
Gerrit CR:

Description

string_arrays appear to be the only array type that was tested.

There is a typo in the function xlate_common which prevents all other types being processed. The memory managment is also mismatched we need to use "topo_mod_free" not "free".

Using the test file included placed in

/usr/platform/i86pc/lib/fm/topo/maps/i86pc-hc-topology.xml

We get

TIME UUID
Jan 05 21:45:56 8e2425f2-3bbe-46bc-a3f6-c3090855916d

hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: authority version: 1 stability: Private/Private
product-id string VMware-Virtual-Platform
chassis-id string VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60
server-id string openindiana
group: system version: 1 stability: Private/Private
isa string i386
machine string i86pc

Fixing up the issue we get

TIME UUID
Jan 05 21:47:15 0386f991-c6a8-6368-a067-e64c76c50433

hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
group: protocol version: 1 stability: Private/Private
resource fmri hc://:product-id=VMware-Virtual-Platform:server-id=openindiana:chassis-id=VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60/chassis=0
stuff uint32[] [ 1 ]
group: authority version: 1 stability: Private/Private
product-id string VMware-Virtual-Platform
chassis-id string VMware-56-4d-82-82-e3-49-cf-1f-d8-36-9f-6b-9e-45-14-60
server-id string openindiana
group: system version: 1 stability: Private/Private
isa string i386
machine string i86pc


Files

i86pc-hc-topology.xml (1.2 KB) i86pc-hc-topology.xml Work completed just need to upstream fix Ben Sims, 2018-01-08 03:19 PM
Actions

Also available in: Atom PDF