main - device_id: handle scsi_debug wwid
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1139a05939f85bd86a756b451a8f194bc7a72a2c Commit: 1139a05939f85bd86a756b451a8f194bc7a72a2c Parent: c35f7722d588009edad22d59c68c82150bb5c216 Author: David Teigland <[email protected]> AuthorDate: Tue Jun 22 13:36:10 2021 -0500 Committer: David Teigland <[email protected]> CommitterDate: Tue Jun 22 13:36:10 2021 -0500
device_id: handle scsi_debug wwid
Ignore the wwid value reported by scsi_debug devices
that begin "t10.Linux scsi_debug". The devname
will be used as the device id.
--- lib/device/device_id.c | 4 ++++ 1 file changed, 4 insertions(+)
lib/device/device_id.c +4 -0
@@ -308,6 +308,10 @@ const char *device_id_system_read(struct cmd_context *cmd, struct device *dev, uif (!sysbuf[0 ])_read_sys_block (cmd, dev,"wwid" , sysbuf,sizeof (sysbuf)); + +/* scsi_debug wwid begins "t10.Linux scsi_debug ..." */ +if (strstr (sysbuf,"scsi_debug" )) + sysbuf[0 ] ='\0' ; }else if (idtype ==DEV_ID_TYPE_SYS_SERIAL )