sanitize_inquiry_string
Prev | drivers/scsi/scsi_scan.c | Next

## Name

sanitize_inquiry_string — remove non-graphical chars from an INQUIRY result string

## Synopsis

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

## Arguments

`s`

  INQUIRY result string to sanitize

`len`

  length of the string

## Description

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.

Prev | Up | Next
scsi_target_reap | Home | scsi_probe_lun