sanitize_inquiry_string(9)

sanitize_inquiry_string9

Remove non-graphical chars from an inquiry result string

Usage

void sanitize_inquiry_string(unsigned char * s, int len);

Arguments

s

INQUIRY result string to sanitize

len

length of the string

Overview

The SCSI spec says that INQUIRY vendor, product, and revision strings must consist entirely of graphic ASCII characters, padded on the right with spaces. Since not all devices obey this rule, we will replace non-graphic or non-ASCII characters with spaces. Exception: a NUL character is interpreted as a string terminator, so all the following characters are set to spaces.

Releases

4 releases since Debian 5.0 (Lenny); the text changed 3 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8

Authors

James Bottomley <[email protected]>

Author.

Rob Landley <[email protected]>

Author.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.