diff options
author | David Teigland <teigland@redhat.com> | 2021-06-24 11:30:46 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2021-06-24 11:30:46 -0500 |
commit | 73a05c8f02e9e4575b1ffceebc3a907f2e43517b (patch) | |
tree | 05d48cc681ac63b6665819ac36d19138c9f1691e | |
parent | 84bd394cf9aaa581b4bf980f764544dda26a0305 (diff) | |
download | lvm2-73a05c8f02e9e4575b1ffceebc3a907f2e43517b.tar.gz |
device_id: handle qemu wwid
Ignore made-up wwid values reported for qemu devices
that contain the string "QEMU HARDDISK". The devname
will be used as the device id.
-rw-r--r-- | lib/device/device_id.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/device/device_id.c b/lib/device/device_id.c index ffeac3064..87a46a73a 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -312,6 +312,10 @@ const char *device_id_system_read(struct cmd_context *cmd, struct device *dev, u /* scsi_debug wwid begins "t10.Linux scsi_debug ..." */ if (strstr(sysbuf, "scsi_debug")) sysbuf[0] = '\0'; + + /* qemu wwid begins "t10.ATA QEMU HARDDISK ..." */ + if (strstr(sysbuf, "QEMU HARDDISK")) + sysbuf[0] = '\0'; } else if (idtype == DEV_ID_TYPE_SYS_SERIAL) |