Project

General

Profile

Bug #10516

fmtopo is missing code to handle properties of type TOPO_TYPE_FMRI_ARRAY

Added by Rob Johnston 9 months ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-03-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

While testing other libtopo changes. I found that the fmtopo utility does not implement code to print properties of type TOPO_TYPE_FMRI_ARRAY. This appears to be simply a missing case in print_prop_nameval() for handling DATA_TYPE_NVLIST_ARRAY.

fmtopo also has an annoying behavior where under certain circumstances it will truncate a property value if it exceeds a certain length. It applies this truncation inconsistently - some values end up really long and span multiple lines - others are truncated. fmtopo is primarily a diagnostic tool for developers and doesn't need to be overly pretty - and I think it's more important to always show all the available information. So this behavior will also be corrected as part of fixing this issue.

Note that this issue has already been fixed in illumos-joyent via the commit below:

commit f2b29c149057da13a23c7c86492e7baf539e4b7f
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   Sat Feb 16 05:03:54 2019 +0000

    OS-7560 libtopo's XML serialization code is broken and incomplete
    OS-7609 fmtopo is missing code to handle properties of type TOPO_TYPE_FMRI_ARRAY
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Jordan Hendricks <jordan.hendricks@joyent.com>

So this issue is simply to track getting the above fix pushed upstream to illumos-gate.

History

#1

Updated by Electric Monk 9 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit ebee07ff4f102cbd3179db7c5070283da35a79f3

commit  ebee07ff4f102cbd3179db7c5070283da35a79f3
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   2019-03-13T20:38:43.000Z

    10515 libtopo's XML serialization code is broken and incomplete
    10516 fmtopo is missing code to handle properties of type TOPO_TYPE_FMRI_ARRAY
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF