Hello community, here is the log from the commit of package parted checked in at Sat Nov 8 20:22:44 CET 2008. -------- --- parted/parted.changes 2008-11-05 12:46:07.000000000 +0100 +++ /mounts/work_src_done/STABLE/parted/parted.changes 2008-11-07 21:59:37.000000000 +0100 @@ -1,0 +2,6 @@ +Fri Nov 7 21:58:52 CET 2008 - puzel@suse.cz + +- fix-corrupted-gpt-crash.patch (bnc#439910) +- fix-dvh-update.patch (bnc#397210) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- fix-corrupted-gpt-crash.patch fix-dvh-update.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ parted.spec ++++++ --- /var/tmp/diff_new_pack.u16309/_old 2008-11-08 20:14:57.000000000 +0100 +++ /var/tmp/diff_new_pack.u16309/_new 2008-11-08 20:14:57.000000000 +0100 @@ -26,7 +26,7 @@ Group: System/Filesystems Summary: GNU partitioner Version: 1.8.8 -Release: 89 +Release: 90 Source0: %{name}-%{version}.tar.bz2 Patch: always-resize-part.dif Patch1: parted-type.patch @@ -42,11 +42,12 @@ Patch12: gnulib.diff Patch51: parted.tty.patch Patch52: parted.no-O_DIRECT.patch -#Patch53: largest_partition_number.patch Patch54: parted-gpt-mbr-sync.patch Patch55: parted-fdasd-compile-fixes Patch56: parted-no-inttypes-include Patch57: fix-improper-data-conversion.patch +Patch58: fix-corrupted-gpt-crash.patch +Patch59: fix-dvh-update.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://www.gnu.org/software/parted/ PreReq: %install_info_prereq @@ -98,11 +99,12 @@ %patch12 %patch51 -p1 %patch52 -p1 -#%#patch53 %patch54 %patch55 -p1 %patch56 -p1 %patch57 -p1 +%patch58 -p1 +%patch59 -p1 %build AUTOPOINT=true autoreconf --force --install @@ -147,6 +149,9 @@ %{_libdir}/*.so %changelog +* Fri Nov 07 2008 puzel@suse.cz +- fix-corrupted-gpt-crash.patch (bnc#439910) +- fix-dvh-update.patch (bnc#397210) * Wed Nov 05 2008 puzel@suse.cz - disabled largest_partition_number.patch (bnc#440141) * Mon Oct 20 2008 puzel@suse.cz ++++++ fix-corrupted-gpt-crash.patch ++++++ # fixes (bnc#439910) # parted used to crash on corrupted gpt label - now warning is printed instead diff --git a/libparted/labels/gpt.c b/libparted/labels/gpt.c index 13d2e88..c20d729 100644 --- a/libparted/labels/gpt.c +++ b/libparted/labels/gpt.c @@ -824,8 +824,18 @@ gpt_read (PedDisk * disk) goto error; if (_read_header (disk->dev, &gpt, 1)) { - PED_ASSERT ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA) - <= disk->dev->length - 1, goto error_free_gpt); + if ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA) + > disk->dev->length - 1) { + if (ped_exception_throw ( + PED_EXCEPTION_WARNING, + PED_EXCEPTION_IGNORE_CANCEL, + _("The primary GPT table states that the backup GPT table is " + "located at the position that is beyond the end of the disk. " + "This means that the GPT structure is corrupted.")) + == PED_EXCEPTION_CANCEL) + goto error_free_gpt; + } + if ((PedSector) PED_LE64_TO_CPU (gpt->AlternateLBA) < disk->dev->length - 1) { char* zeros = ped_malloc (pth_get_size (disk->dev)); ++++++ fix-dvh-update.patch ++++++ # fixes (bnc#397210) # see comment in the patch for explanation diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c index 0107dd2..041208a 100644 --- a/libparted/arch/linux.c +++ b/libparted/arch/linux.c @@ -2248,7 +2248,15 @@ static int _disk_sync_part_table (PedDisk* disk) { int i; - int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); + int last; + + /* parted treats DVH directory entries as logical partitions with number > 16; + * we don't want to inform kernel about directory entries + */ + if (strcmp (disk->type->name, "dvh") == 0) + last = 16; + else + last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); int* rets = ped_malloc(sizeof(int) * last); int* errnums = ped_malloc(sizeof(int) * last); int ret = 1; @@ -2470,8 +2478,16 @@ static int _dm_reread_part_table (PedDisk* disk) { int rc = 1; - int last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); int i; + int last; + + /* parted treats DVH directory entries as partitions logical with number > 16; + * we don't want to inform kernel about directory entries + */ + if (strcmp (disk->type->name, "dvh") == 0) + last = 16; + else + last = PED_MAX (ped_disk_get_last_partition_num (disk), 16); sync(); if (!_dm_remove_parts(disk->dev)) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org