Project

General

Profile

Bug #10279

ses enumerator should trim leading/trailing whitespace from labels

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-01-24
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

It's not uncommon for the string descriptors in the Element Descriptor Diagnostic Page (07h) to contain trailing whitespace. For example we see the following with the WDC US60+8 storage server.:

[root@smartos-wdc /var/tmp]# ./hwgrok | json "fans" | grep label
    "label": "FAN ENCL 1      ",
    "label": "FAN ENCL 2      ",
    "label": "FAN ENCL 3      ",
    "label": "FAN ENCL 4      ",
    "label": "FAN PSU A       ",
    "label": "FAN PSU B       ",

[root@smartos-wdc /var/tmp]# ./hwgrok | json "power-supplies" | grep label
    "label":"POWER SUPPLY A,DPS-2000CB Es,,,DELTA,1600W                                                  " 
    "label":"POWER SUPPLY B,DPS-2000CB E/,,,DELTA,1600W                                                  " 

The ses enumerator plugin should trim any trailing whitespace off these strings.

History

#1

Updated by Rob Johnston 9 months ago

Note that this change has already been integrated into illumos-joyent via the commit below:

commit 8ebfdc66bf6e05607c459ce7468ce7ec72f6f8c6
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   Mon Sep 10 21:40:22 2018 +0000

    OS-7180 ses enumerator should trim leading/trailing whitespace from labels
    OS-7234 ses enumerator should make protocol/label prop mutable
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Jordan Hendricks <jordan.hendricks@joyent.com>

See the original SmartOS ticket for details on how this change was tested:

https://smartos.org/bugview/OS-7180

#2

Updated by Electric Monk 9 months ago

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

git commit 469735ec6bb6989760271d57d715d349b93f607f

commit  469735ec6bb6989760271d57d715d349b93f607f
Author: Rob Johnston <rob.johnston@joyent.com>
Date:   2019-01-29T22:13:11.000Z

    10279 ses enumerator should trim leading/trailing whitespace from labels
    10280 ses enumerator module should make protocol/label prop mutable
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF