1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

device: Fix BLKSSZGET definition check.

This commit is contained in:
Alasdair G Kergon 2014-10-13 18:15:41 +01:00
parent 22a6b0e40b
commit d1bcdd7338

View File

@ -154,7 +154,7 @@ int dev_get_block_size(struct device *dev, unsigned int *physical_block_size, un
}
log_debug_devs("%s: physical block size is %u bytes", name, dev->phys_block_size);
}
#elif BLKSSZGET
#elif defined (BLKSSZGET)
/* if we can't get physical block size, just use logical block size instead */
if (dev->phys_block_size == -1) {
if (ioctl(dev_fd(dev), BLKSSZGET, &dev->phys_block_size) < 0) {