diff options
Diffstat (limited to 'utils/blkmapd/device-inq.c')
-rw-r--r-- | utils/blkmapd/device-inq.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/blkmapd/device-inq.c b/utils/blkmapd/device-inq.c index 6b56b67..0062a8f 100644 --- a/utils/blkmapd/device-inq.c +++ b/utils/blkmapd/device-inq.c @@ -198,6 +198,13 @@ struct bl_serial *bldev_read_serial(int fd, const char *filename) dev_id = (struct bl_dev_id *)&(dev_root->data[pos]); pos += (dev_id->len + devid_len); + /* Some targets export zero length EVPD pages, + * skip them to not confuse the device id + * cache. + */ + if (!dev_id->len) + continue; + if ((dev_id->ids & 0xf) < current_id) continue; switch (dev_id->ids & 0xf) { |