Project

General

Profile

Bug #9835

ses topo module should use topo_mod_clean_str()

Added by Rob Johnston about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2018-09-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

The commit below introduced a new libtopo module API for cleaning up strings ready from hardware: topo_mod_clean_str()

commit 6d65bee7bcc62b2d9bdfde6610561ce76c92a908
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   Wed Aug 22 10:47:22 2018 -0700

    9459 Implement topo module to enumerate dimms from smbios
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Richard Lowe <richlowe@richlowe.net>

The ses topo module implements a function disk_auth_clean() that effectively duplicates this functionality. To reduce code duplication, disk_auth_clean() should be removed and places that called it should be modified to call topo_mod_clean_str().

History

#1

Updated by Rob Johnston about 1 year ago

  • Subject changed from ses toopo module should use topo_mod_clean_str() to ses topo module should use topo_mod_clean_str()
#2

Updated by Rob Johnston about 1 year ago

Testing

Took topo snapshots (using fmtopo) on multiple machines in the joyent lab and on mu OI workstation at home and verified that the FRU identity strings read from the drives were cleaned, where necessary of trailing and leading whitespace and illegal characters were converted to "-".

#3

Updated by Electric Monk about 1 year ago

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

git commit cbb9248e66a77c6382c6f48aebae5fd0ee60fa69

commit  cbb9248e66a77c6382c6f48aebae5fd0ee60fa69
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   2018-09-18T16:57:51.000Z

    9835 ses topo module should use topo_mod_clean_str()
    Reviewed by: Yuri Pankov <yuripv@yuripv.net>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF