Project

General

Profile

Actions

Bug #7215

closed

usba logging through cmn_err (via usba_bus_ctl) output erroneously includes tab

Added by James Blachly almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
driver - device drivers
Start date:
2016-07-23
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

Input to cmn_err() should not include tab control character. If present, it is converted to its octal representation in the output stream.

Code below from illumos-gate/usr/src/uts/common/io/usb/usba/usba.c

            (void) usba_get_mfg_prod_sn_str(rdip, name, MAXNAMELEN);
            if (name[0] != '\0') {
                cmn_err(CE_CONT, "?\t%s\n", name);
            }

On my system when viewing kern.info with dmesg this produces the following (Note "#011" -- TAB is octal 011):

2016-07-23T19:04:29.553378+00:00 smartos usba: [ID 349649 kern.info] #011Tripp Lite  RIPP LITE SMART1000RM2U  2535EY0SM826700276

(Side note: The missing "T" in TRIPP LITE later in the line I have also solved, but am entering a separate issue, because the fix will require some discussion)


Related issues

Related to illumos gate - Bug #7216: usba logging through cmn_err (via usba_bus_ctl) output truncates (leading) some device namesClosedJames Blachly2016-07-23

Actions
Actions #1

Updated by James Blachly almost 6 years ago

  • Related to Bug #7216: usba logging through cmn_err (via usba_bus_ctl) output truncates (leading) some device names added
Actions #2

Updated by Electric Monk almost 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit 5c9564e13556d93b85933b234fdd8810ce82cd93

commit  5c9564e13556d93b85933b234fdd8810ce82cd93
Author: James Blachly <james.blachly@gmail.com>
Date:   2016-08-15T14:19:42.000Z

    7215 usba logging through cmn_err (via usba_bus_ctl) output erroneously includes tab
    7216 usba logging through cmn_err (via usba_bus_ctl) output truncates (leading) some device names
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF