]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: don't report 0-bytes in serial number
authorMartin Wilck <mwilck@suse.com>
Thu, 13 Jul 2017 22:25:31 +0000 (00:25 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Jul 2017 14:41:56 +0000 (08:41 -0600)
commit75bd6b7079472c7e3d287dc92e6145340a888b37
tree8601760e3887a31bf1b84258a25ce02352c3b357
parentc82190242ec5eeb40001f780c95dd3b205da163a
nvmet: don't report 0-bytes in serial number

The NVME standard mandates that the SN, MN, and FR fields of the Identify
Controller Data Structure be "ASCII strings".  That means that they may
not contain 0-bytes, not even string terminators.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
[hch: fixed for the move of the serial field, updated description]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/admin-cmd.c