From fae811d0967e63ebd17191f033ee843558f4965c Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 26 Jan 2009 16:24:52 +0100 Subject: [PATCH] _disk_sync_part_table: revise yet again This fixes a bug whereby parted could leave the kernel with an erroneous view of a partition table. * libparted/arch/linux.c (_disk_sync_part_table): Per analysis in http://thread.gmane.org/gmane.comp.gnu.parted.devel/2297/focus=2307. Patch suggested by Petr Uzel. --- libparted/arch/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c index 83e24c8..3527f5d 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -1,5 +1,5 @@ /* libparted - a library for manipulating disk partitions - Copyright (C) 1999 - 2005, 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 1999 - 2005, 2007, 2008, 2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2251,7 +2251,7 @@ _disk_sync_part_table (PedDisk* disk) if (largest_partnum <= 0) return 1; - int last = PED_MIN (largest_partnum, 16); + int last = 16; int* rets = ped_malloc(sizeof(int) * last); int* errnums = ped_malloc(sizeof(int) * last); int ret = 1; -- 2.11.0