From 6db767961b90a66b83f04e2ae15202a6abee1bc0 Mon Sep 17 00:00:00 2001 From: Heinz Mauelshagen Date: Tue, 29 Jan 2002 15:43:04 +0000 Subject: [PATCH] fixed div bug in calculation of end in calculate_extent_count --- lib/format1/layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/format1/layout.c b/lib/format1/layout.c index f500b6c63..8bccaf10b 100644 --- a/lib/format1/layout.c +++ b/lib/format1/layout.c @@ -140,8 +140,8 @@ int calculate_extent_count(struct physical_volume *pv) do { pvd->pe_total--; _calc_simple_layout(pvd); - end = ((pvd->pe_on_disk.base + pvd->pe_on_disk.size) / - SECTOR_SIZE); + end = ((pvd->pe_on_disk.base + pvd->pe_on_disk.size + \ + SECTOR_SIZE - 1) / SECTOR_SIZE); pvd->pe_start = _round_up(end, PE_ALIGN); -- 2.43.5