diff options
| author | David Disseldorp <[email protected]> | 2018-12-05 13:18:35 +0100 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2018-12-07 21:54:33 -0500 |
| commit | b2da4abf26e859c6c17b49f6f728db0eaab9bc4a (patch) | |
| tree | d0050f258c6d6b707be82218373d9d96f0d609d6 /include/linux | |
| parent | 0de263577de5d5e052be5f4f93334e63cc8a7f0b (diff) | |
scsi: target: consistently null-terminate t10_wwn strings
In preparation for supporting user provided vendor strings, add an extra
byte to the vendor, model and revision arrays in struct t10_wwn. This
ensures that the full INQUIRY data can be carried in the arrays along with
a null-terminator.
Change a number of array readers and writers so that they account for
explicit null-termination:
- The pscsi_set_inquiry_info() and emulate_model_alias_store() codepaths
don't currently explicitly null-terminate; fix this.
- Existing t10_wwn field dumps use for-loops which step over
null-terminators for right-padding.
+ Use printf with width specifiers instead.
Signed-off-by: David Disseldorp <[email protected]>
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions