Commit 99243b92 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer

dm table: fix "nvme" test

The strncmp function should compare 4 bytes.

Fixes: 22c11858 ("dm: introduce DM_TYPE_NVME_BIO_BASED")
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent da1e1488
...@@ -1755,7 +1755,7 @@ static int device_no_partial_completion(struct dm_target *ti, struct dm_dev *dev ...@@ -1755,7 +1755,7 @@ static int device_no_partial_completion(struct dm_target *ti, struct dm_dev *dev
char b[BDEVNAME_SIZE]; char b[BDEVNAME_SIZE];
/* For now, NVMe devices are the only devices of this class */ /* For now, NVMe devices are the only devices of this class */
return (strncmp(bdevname(dev->bdev, b), "nvme", 3) == 0); return (strncmp(bdevname(dev->bdev, b), "nvme", 4) == 0);
} }
static bool dm_table_does_not_support_partial_completion(struct dm_table *t) static bool dm_table_does_not_support_partial_completion(struct dm_table *t)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment