]> git.ipfire.org Git - thirdparty/mdadm.git/commit
imsm: fix reading scsi serial
authorArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Thu, 2 Nov 2017 15:10:57 +0000 (16:10 +0100)
committerJes Sorensen <jsorensen@fb.com>
Thu, 2 Nov 2017 15:33:09 +0000 (11:33 -0400)
commit01a052b9c1c6bdc7307a3f8e8d12db262d9b258c
tree7d5af1f92967ee5d271fc454b98d95ce4e6d3709
parent3bc6f786e1156d12ee466d732930bf71f6a8083a
imsm: fix reading scsi serial

Improve error detection after SG_IO ioctl. Checking only the return
value and response length is insufficient and leads to anomalies if a
drive does not have a serial number.

Reported-by: NeilBrown <neilb@suse.com>
Tested-by: NeilBrown <neilb@suse.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
sg_io.c