diff options
author | 2006-08-21 15:53:25 -0400 | |
---|---|---|
committer | 2006-09-02 13:36:59 -0500 | |
commit | e5b3cd42960a10c1bc3701d4f00767463c88ec9d (patch) | |
tree | f8e54261c465f51fe1ebc67facf9074f0744e385 /include/scsi | |
parent | [SCSI] sd: fix cache flushing on module removal (and individual device removal) (diff) | |
download | linux-e5b3cd42960a10c1bc3701d4f00767463c88ec9d.tar.gz linux-e5b3cd42960a10c1bc3701d4f00767463c88ec9d.tar.bz2 linux-e5b3cd42960a10c1bc3701d4f00767463c88ec9d.zip |
[SCSI] SCSI: sanitize INQUIRY strings
Sanitize the Vendor, Product, and Revision strings contained in an
INQUIRY result by setting all non-graphic or non-ASCII characters to ' '.
Since the standard disallows such characters, this will affect
only non-compliant devices.
To help maintain backward compatibility, NUL characters are treated
specially. They are taken as string terminators; they and all the
following characters are set to ' '. If some valid characters get
erased as a result... well, we weren't seeing them before so we haven't
lost anything.
The primary purpose of this change is to allow blacklist entries to
match devices with illegal Vendor or Product strings.
In addition, the patch updates a couple of function prototypes, giving
inq_result its correct type (unsigned char *).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
0 files changed, 0 insertions, 0 deletions