---
name: "sanitize_inquiry_string"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/sanitize_inquiry_string"
---

# sanitize\_inquiry\_string(9)

remove non-graphical chars from an INQUIRY result string

## 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.

## AUTHORS

**James Bottomley** \<James.Bottomley@hansenpartnership.com\>

Author.

**Rob Landley** \<rob@landley.net\>

Author.

## COPYRIGHT
