mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dev-swap: use SECTOR_SHIFT
This commit is contained in:
parent
936bfeb8de
commit
c595b20e56
@ -59,7 +59,7 @@ int dev_is_swap(struct device *dev, uint64_t *offset_found)
|
||||
*/
|
||||
if (page == 0x8000)
|
||||
continue;
|
||||
if (size < (page / 512))
|
||||
if (size < (page >> SECTOR_SHIFT))
|
||||
break;
|
||||
if (!dev_read(dev, page - SIGNATURE_SIZE,
|
||||
SIGNATURE_SIZE, buf)) {
|
||||
|
Loading…
Reference in New Issue
Block a user