[PATCH 2/6] _disk_sync_part_table: revise yet again
Jim Meyering
meyering at redhat.com
Mon Jan 26 15:24:52 UTC 2009
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 files 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;
--
1.6.1.1.347.g3f81d
More information about the parted-devel
mailing list