1SANITIZE_INQUIRY_STR(9) SCSI mid layer SANITIZE_INQUIRY_STR(9)
2
3
4
6 sanitize_inquiry_string - remove non-graphical chars from an INQUIRY
7 result string
8
10 void sanitize_inquiry_string(unsigned char * s, int len);
11
13 s
14 INQUIRY result string to sanitize
15
16 len
17 length of the string
18
20 The SCSI spec says that INQUIRY vendor, product, and revision strings
21 must consist entirely of graphic ASCII characters, padded on the right
22 with spaces. Since not all devices obey this rule, we will replace
23 non-graphic or non-ASCII characters with spaces. Exception: a NUL
24 character is interpreted as a string terminator, so all the following
25 characters are set to spaces.
26
28 James Bottomley <James.Bottomley@hansenpartnership.com>
29 Author.
30
31 Rob Landley <rob@landley.net>
32 Author.
33
35Kernel Hackers Manual 2.6. June 2019 SANITIZE_INQUIRY_STR(9)