From b1ab8b00b8a7bd68f790069ebec0a5931f90b8fa Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Mon, 15 Jan 2007 21:55:11 +0000 Subject: [PATCH] Fix partition table processing after sparc changes (introduced in 2.02.16). Fix cmdline PE range processing segfault (introduced in 2.02.13). --- WHATS_NEW | 2 ++ lib/device/device.c | 2 +- tools/toollib.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index d73c8572a..e4c7ad2ea 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.19 - =================================== + Fix partition table processing after sparc changes (2.02.16). + Fix cmdline PE range processing segfault (2.02.13). Some libdevmapper-event interface changes. Report dmeventd mirror monitoring status. Fix dmeventd mirror status line processing. diff --git a/lib/device/device.c b/lib/device/device.c index 3a9bd70d2..c4cd83db6 100644 --- a/lib/device/device.c +++ b/lib/device/device.c @@ -72,7 +72,7 @@ static int _has_partition_table(struct device *dev) /* Check for msdos partition table */ part_magic = buf + PART_MAGIC_OFFSET/sizeof(buf[0]); if ((*part_magic == xlate16(PART_MAGIC))) { - part = (struct partition *) (buf + PART_OFFSET); + part = (struct partition *) (buf + PART_OFFSET/sizeof(buf[0])); for (p = 0; p < 4; p++, part++) { /* Table is invalid if boot indicator not 0 or 0x80 */ if ((part->boot_ind & 0x7f)) { diff --git a/tools/toollib.c b/tools/toollib.c index 2d655ee6e..fb2a70136 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -993,7 +993,7 @@ static int _create_pv_entry(struct dm_pool *mem, struct pv_list *pvl, } /* Determine selected physical extents */ - if (!_parse_pes(mem, colon, pe_ranges, dev_name(pvl->pv->dev), + if (!_parse_pes(mem, colon, new_pvl->pe_ranges, dev_name(pvl->pv->dev), pvl->pv->pe_count)) { stack; return 0; -- 2.43.5