Hello community,
here is the log from the commit of package parted for openSUSE:Factory
checked in at Sat Apr 3 00:14:41 CEST 2010.
--------
--- parted/parted.changes 2010-02-01 13:22:58.000000000 +0100
+++ /mounts/work_src_done/STABLE/parted/parted.changes 2010-04-02 11:43:10.000000000 +0200
@@ -1,0 +2,130 @@
+Fri Apr 2 08:41:02 UTC 2010 - puzel@novell.com
+
+- add parted-remove-experimental-warning.patch
+- refresh always_print_geom.diff to apply at correct function
+
+-------------------------------------------------------------------
+Fri Feb 26 17:56:05 UTC 2010 - puzel@novell.com
+
+- update to parted-2.2
+ - Changes in behavior
+ - The default alignment (--align option) for newly created
+ partitions has been changed to optimal.
+ - New features
+ - The ped_device_get_*_alignment() functions now return a sane
+ default value instead of NULL when the so called topology
+ information is incomplete. The default minimum alignment aligns
+ to physical sector size, the default optimal alignment is 1MiB,
+ which is what vista and windows 7 do.
+ - Bug fixes
+ - Parted no longer uses a physical sector size of 0 or of any
+ other value smaller than the logical sector size.
+ - dos: creating an HFS or HFS+ partition in an msdos partition
+ table used to set the partition type to 0x83. That is wrong.
+ The required number is 0xaf, and that is what is used now.
+ - gpt: read-only operation could clobber MBR part of hybrid
+ GPT+MBR table [bug introduced in parted-2.1]
+ - gpt: a read-only operation like "parted $dev print" would
+ overwrite $dev's protective MBR when exactly one of the primary
+ and backup GPT tables was found to be corrupt. [bug introduced
+ prior to parted-1.8.0]
+ - sun: the version, sanity and nparts VTOC fields were ignored by
+ libparted. Those fields are properly initialized now. The
+ nparts (number of partitions) field is initialized to 8 (max.
+ number of sun partitions) rather that to a real number of
+ partitions. This solution is compatible with Linux kernel and
+ Linux fdisk.
+ - libparted: try harder to inform kernel of partition changes.
+ Previously when editing partitions, occasionally the kernel
+ would fail to be informed of partition changes. When this
+ happened future problems would occur because the kernel had
+ incorrect information. For example, if this problem arose when
+ resizing or creating a new partition, then an incorrect
+ partition size might be displayed or a user might encounter a
+ failure to format or delete a newly created partition,
+ respectively.
+ - libparted: committing a disk that was returned by
+ ped_disk_duplicate would always result in ped_disk_clobber being
+ called (and thus the first and last 9KiB of the disk being
+ zeroed), even if the duplicated disk, was not returned by
+ ped_disk_fresh().
+- drop do-not-install-test-programs.patch (fixed in upstream)
+
+-------------------------------------------------------------------
+Wed Feb 17 16:33:01 UTC 2010 - puzel@novell.com
+
+- add do-not-install-test-programs.patch
+ - avoid deleting this in specfile
+
+-------------------------------------------------------------------
+Mon Feb 1 13:34:10 UTC 2010 - puzel@novell.com
+
+- update to parted-2.1 (noteworthy changes)
+ * New features
+ - new --align=<align> commandline option which can have the
+ following values:
+ - none: Use the minimum alignment allowed by the disk type
+ - cylinder: Align partitions to cylinders (the default)
+ - minimal: Use minimum alignment as given by the disk
+ topology information
+ - optimal: Use optimum alignment as given by the disk
+ topology information
+ The minimal and optimal values will use layout information
+ provided by the disk to align the logical partition table
+ addresses to actual physical blocks on the disks. The minimal
+ value uses the minimum alignment needed to align the partition
+ properly to physical blocks, which avoids performance
+ degradation. Where as the optimal value uses a multiple of the
+ physical block size in a way that guarantees optimal
+ performance. The min and opt values will only work when
+ compiled with libblkid >= 2.17 and running on a kernel >=
+ 2.6.31, otherwise they will behave as the none --align value.
+ - Parted now supports disks with sector size larger than 512 bytes.
+ Before this release, parted could operate only on disks with a
+ sector size of 512 bytes. However, disk manufacturers are
+ already making disks with an exposed hardware sector size of
+ 4096 bytes. Prior versions of parted cannot even read a
+ partition table on such a device, not to mention create or
+ manipulate existing partition tables. Due to internal design
+ and time constraints, the following less-common partition
+ table types are currently disabled:
+ - amiga, bsd, aix, pc98
+ - new command "align-check TYPE N" to determine whether the
+ starting sector of partition N is
+ TYPE(minimal|optimal)-aligned for the disk. The same
+ libblkid and kernel version requirements apply as for --align
+ * Bug fixes
+ - parted can once again create partition tables on loop devices.
+ - improved >512-byte sector support
+ - gpt tables are more rigorously checked
+ - improved dasd disk support
+ - handle device nodes created by lvm built with udev
+ synchronisation enabled properly.
+ - when printing tables, parted no longer truncates flag names
+ - Partitions in a GPT table are no longer assigned the
+ "microsoft reserved partition" type. Before this change,
+ each partition would be listed with a type of "msftres" by
+ default.
+ * Notice
+ - Parted stopped using BLKPG_* ioctls to inform the kernel
+ about changes of the partition table. The consequence of this
+ change is that parted alone can no longer inform the kernel
+ about changes to partition table on a disk where some of the
+ partitions are mounted.
+- build requires check-devel and pkg-config
+- drop parted-1.8.3.dif - fixed by adding pkg-config and check-devel
+ to BuildRequires
+- drop parted.tty.patch, parted.no-O_DIRECT.patch,
+ do-not-discard-bootcode-in-extended-partition.patch,
+ avoid-unnecessary-open-close.patch,
+ do-not-unnecessarily-open-part-dev.patch
+ - fixed upstream
+- drop fix-tests.sh - make check disabled in specfile
+- drop fix-error-informing-the-kernel.patch,
+ fix-race-call-udevadm-settle.patch,
+ retry-blkpg-ioctl.patch, use-ext-range.patch
+ - affected code removed as part of the BLKPG to BLKRRPART
+ switch
+- clean up specfile
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
avoid-unnecessary-open-close.patch
do-not-discard-bootcode-in-extended-partition.patch
do-not-unnecessarily-open-part-dev.patch
fix-error-informing-the-kernel.patch
fix-race-call-udevadm-settle.patch
fix-tests.sh
parted-1.8.3.dif
parted-1.9.0.tar.bz2
parted.no-O_DIRECT.patch
parted.tty.patch
retry-blkpg-ioctl.patch
use-ext-range.patch
New:
----
parted-2.2.tar.bz2
parted-remove-experimental-warning.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ parted.spec ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:15.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:15.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package parted (Version 1.9.0)
+# spec file for package parted (Version 2.2)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -15,23 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: parted
-BuildRequires: device-mapper-devel
-BuildRequires: e2fsprogs-devel
-BuildRequires: libreiserfs-devel
-BuildRequires: readline-devel
-BuildRequires: libsepol-devel
-BuildRequires: libselinux-devel
-%define aclocaldir /usr/share/aclocal
+Version: 2.2
+Release: 1
License: GPLv3+
-Group: System/Filesystems
-Requires: /sbin/udevadm
Summary: GNU partitioner
-Version: 1.9.0
-Release: 5
+Url: http://www.gnu.org/software/parted/
+Group: System/Filesystems
Source0: %{name}-%{version}.tar.bz2
Source1: baselibs.conf
Patch0: always-resize-part.dif
@@ -39,35 +31,29 @@
Patch2: parted-mac.patch
Patch3: parted-wipeaix.patch
Patch4: etherd_support.diff
-Patch5: parted-1.8.3.dif
-Patch6: hfs_fix.dif
-Patch7: always_print_geom.diff
-Patch8: fix-function-def.patch
-Patch9: parted.tty.patch
-Patch10: parted.no-O_DIRECT.patch
-Patch11: parted-gpt-mbr-sync.patch
-Patch12: parted-no-inttypes-include
-Patch13: fix-error-informing-the-kernel.patch
-Patch14: do-not-discard-bootcode-in-extended-partition.patch
+Patch5: hfs_fix.dif
+Patch6: always_print_geom.diff
+Patch7: fix-function-def.patch
+Patch8: parted-gpt-mbr-sync.patch
+Patch9: parted-no-inttypes-include
#PATCH-FEATURE-OPENSUSE fix-dm-partition-name.patch bnc471440,447591 petr.uzel@suse.cz
-Patch15: fix-dm-partition-name.patch
-#PATCH-FEATURE-OPENSUSE fix-tests.sh petr.uzel@suse.cz
-Patch16: fix-tests.sh
+Patch10: fix-dm-partition-name.patch
#PATCH-FEATURE-OPENSUSE do-not-create-dm-nodes.patch bnc#501773 petr.uzel@suse.cz
-Patch17: do-not-create-dm-nodes.patch
-#PATCH-FIX-UPSTREAM avoid-unnecessary-open-close.patch bnc#539521 petr.uzel@suse.cz
-Patch18: avoid-unnecessary-open-close.patch
-#PATCH-FIX-UPSTREAM do-not-unnecessarily-open-part-dev.patch bnc#539521 petr.uzel@suse.cz
-Patch19: do-not-unnecessarily-open-part-dev.patch
-#PATCH-FIX-UPSTREAM fix-race-call-udevadm-settle.patch bnc#539521 petr.uzel@suse.cz
-Patch20: fix-race-call-udevadm-settle.patch
-#PATCH-FIX-UPSTREAM retry-blkpg-ioctl.patch bnc#539521 petr.uzel@suse.cz
-Patch21: retry-blkpg-ioctl.patch
-#PATCH-FIX-UPSTREAM use-ext-range.patch bnc#567652 petr.uzel@suse.cz
-Patch22: use-ext-range.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Url: http://www.gnu.org/software/parted/
+Patch11: do-not-create-dm-nodes.patch
+#PATCH-FIX-UPSTREAM parted-remove-experimental-warning.patch
+Patch12: parted-remove-experimental-warning.patch
+
+Requires: /sbin/udevadm
+BuildRequires: check-devel
+BuildRequires: device-mapper-devel >= 1.02.33
+BuildRequires: e2fsprogs-devel
+BuildRequires: libreiserfs-devel
+BuildRequires: libselinux-devel
+BuildRequires: libsepol-devel
+BuildRequires: pkg-config
+BuildRequires: readline-devel
PreReq: %install_info_prereq
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
# bug437293
%ifarch ppc64
Obsoletes: parted-64bit
@@ -77,15 +63,14 @@
GNU Parted is a program for creating, destroying, resizing, checking,
and copying partitions, and the file systems on them.
-Authors:
---------
- Andrew Clausen
-
%package devel
-License: GPLv2+
+License: GPLv3+
Summary: Parted Include Files and Libraries necessary for Development
Group: Development/Libraries/C and C++
-Requires: e2fsprogs-devel parted = %version device-mapper-devel libreiserfs-devel
+Requires: device-mapper-devel >= 1.02.33
+Requires: e2fsprogs-devel
+Requires: libreiserfs-devel
+Requires: parted = %version
# bug437293
%ifarch ppc64
Obsoletes: parted-devel-64bit
@@ -95,15 +80,6 @@
This package contains all necessary include files and libraries needed
to develop applications that require these.
-Authors:
---------
- Andrew Clausen
- Lennert Buytenhek
- Matthew Wilson
- Masahiro Sakai
- Ben Collins
- Matt Domsch
-
%lang_package
%prep
%setup -q
@@ -112,24 +88,14 @@
%patch2 -p1
%patch3 -p1
%patch4 -p0
-%patch5
-%patch6 -p1
+%patch5 -p1
+%patch6
%patch7
%patch8
%patch9 -p1
%patch10 -p1
-%patch11
+%patch11 -p1
%patch12 -p1
-%patch13 -p1
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
-%patch20 -p1
-%patch21 -p1
-%patch22 -p1
%build
AUTOPOINT=true autoreconf --force --install
@@ -142,12 +108,12 @@
make %{?jobs:-j%jobs}
%install
-make DESTDIR="$RPM_BUILD_ROOT" install
-rm $RPM_BUILD_ROOT%{_libdir}/*.la
+%makeinstall
+rm %{buildroot}%{_libdir}/*.la
%find_lang %{name}
%clean
-rm -rf "$RPM_BUILD_ROOT"
+rm -rf %{buildroot}
%post
/sbin/ldconfig
@@ -168,7 +134,7 @@
%files devel
%defattr(-,root,root)
%doc doc/API doc/FAT
-%{_prefix}/include/*
+%{_includedir}/*
%{_libdir}/pkgconfig/libparted.pc
%{_libdir}/*.so
++++++ always-resize-part.dif ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:16.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:16.000000000 +0200
@@ -1,9 +1,13 @@
+---
+ parted/parted.c | 24 +++++++++++++++++++++---
+ 1 file changed, 21 insertions(+), 3 deletions(-)
+
Index: parted/parted.c
===================================================================
---- parted/parted.c.orig 2009-07-30 16:28:06.000000000 +0200
-+++ parted/parted.c 2009-07-30 16:28:07.000000000 +0200
-@@ -1779,7 +1779,7 @@ do_resize (PedDevice** dev)
- {
+--- parted/parted.c.orig 2010-02-02 11:28:07.000000000 +0100
++++ parted/parted.c 2010-02-02 11:31:00.000000000 +0100
+@@ -1853,7 +1853,7 @@ do_resize (PedDevice** dev)
+ issue_fs_op_warning ("resize");
PedDisk *disk;
PedPartition *part = NULL;
- PedFileSystem *fs;
@@ -11,39 +15,39 @@
PedConstraint *constraint;
PedSector start, end;
PedGeometry *range_start = NULL, *range_end = NULL;
-@@ -1816,22 +1816,39 @@ do_resize (PedDevice** dev)
+@@ -1890,22 +1890,39 @@ do_resize (PedDevice** dev)
goto error_destroy_constraint;
ped_partition_set_system (part, NULL);
} else {
-+ int always_resize = getenv( "YAST_IS_RUNNING" ) != NULL;
-+ const char* fsname = "";
-+ if( always_resize )
-+ {
-+ PedFileSystemType* fst = ped_file_system_probe( &part->geom );
-+ if( fst )
-+ fsname = fst->name;
-+ }
++ int always_resize = getenv( "YAST_IS_RUNNING" ) != NULL;
++ const char* fsname = "";
++ if( always_resize )
++ {
++ PedFileSystemType* fst = ped_file_system_probe( &part->geom );
++ if( fst )
++ fsname = fst->name;
++ }
fs = ped_file_system_open (&part->geom);
- if (!fs)
-+ if (!fs && (!always_resize || strncmp(fsname,"fat",3)==0) )
++ if (!fs && (!always_resize || strncmp(fsname,"fat",3)==0) )
goto error_destroy_disk;
-+ if (fs)
++ if (fs)
constraint = constraint_intersect_and_destroy (
ped_file_system_get_resize_constraint (fs),
constraint_from_start_end (
*dev, range_start, range_end));
-+ else
-+ {
-+ new_geom.start = part->geom.start;
-+ constraint = ped_constraint_exact(&new_geom);
-+ }
++ else
++ {
++ new_geom.start = part->geom.start;
++ constraint = ped_constraint_exact(&new_geom);
++ }
if (!ped_disk_set_partition_geom (disk, part, constraint,
new_geom.start, new_geom.end))
goto error_close_fs;
- if (!ped_file_system_resize (fs, &part->geom, g_timer))
-+ if(fs)
-+ {
-+ if (!ped_file_system_resize (fs, &part->geom, g_timer) && !always_resize )
++ if(fs)
++ {
++ if (!ped_file_system_resize (fs, &part->geom, g_timer) && !always_resize )
goto error_close_fs;
/* may have changed... eg fat16 -> fat32 */
ped_partition_set_system (part, fs->type);
@@ -53,7 +57,7 @@
ped_disk_commit (disk);
ped_constraint_destroy (constraint);
-@@ -1847,6 +1864,7 @@ do_resize (PedDevice** dev)
+@@ -1921,6 +1938,7 @@ do_resize (PedDevice** dev)
return 1;
error_close_fs:
++++++ always_print_geom.diff ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:16.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:16.000000000 +0200
@@ -1,26 +1,26 @@
Index: parted/parted.c
===================================================================
---- parted/parted.c.orig 2009-07-29 14:41:35.000000000 +0200
-+++ parted/parted.c 2009-07-29 14:41:59.000000000 +0200
-@@ -1312,7 +1312,21 @@ do_print (PedDevice** dev)
+--- parted/parted.c.orig 2010-04-02 10:22:16.000000000 +0200
++++ parted/parted.c 2010-04-02 10:40:03.000000000 +0200
+@@ -1435,8 +1435,20 @@ do_print (PedDevice** dev)
+ wchar_t* table_rendered;
disk = ped_disk_new (*dev);
- if (!disk)
-+ {
-+ if (ped_unit_get_default () == PED_UNIT_CHS ||
-+ ped_unit_get_default () == PED_UNIT_CYLINDER)
-+ {
-+ PedCHSGeometry* chs = &(*dev)->bios_geom;
-+ char* cyl_size = ped_unit_format_custom (*dev,
-+ chs->heads * chs->sectors,
-+ PED_UNIT_KILOBYTE);
-+ printf (_("BIOS cylinder,head,sector geometry: %d,%d,%d. "
-+ "Each cylinder is %s.\n"),
-+ chs->cylinders, chs->heads, chs->sectors, cyl_size);
-+ free (cyl_size);
-+ }
+- if (!disk)
++ if (!disk) {
++ if (ped_unit_get_default () == PED_UNIT_CHS ||
++ ped_unit_get_default () == PED_UNIT_CYLINDER) {
++ PedCHSGeometry* chs = &(*dev)->bios_geom;
++ char* cyl_size = ped_unit_format_custom (*dev,
++ chs->heads * chs->sectors,
++ PED_UNIT_KILOBYTE);
++ printf (_("BIOS cylinder,head,sector geometry: %d,%d,%d. "
++ "Each cylinder is %s.\n"),
++ chs->cylinders, chs->heads, chs->sectors, cyl_size);
++ free (cyl_size);
++ }
goto error;
-+ }
++ }
- peek_word = command_line_peek_word ();
- if (peek_word) {
+ if (ped_disk_is_flag_available(disk, PED_DISK_CYLINDER_ALIGNMENT))
+ if (!ped_disk_set_flag(disk, PED_DISK_CYLINDER_ALIGNMENT,
++++++ do-not-create-dm-nodes.patch ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:16.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:16.000000000 +0200
@@ -58,7 +58,7 @@
+ fclose(f);
+
+ /* Wait for udev to finish */
-+ if (system ("/sbin/udevadm settle") != 0) {
++ if (system ("/sbin/udevadm settle --timeout=20") != 0) {
+ /* udevadm settle failed - let's sleep for a while */
+ sleep (2);
}
++++++ etherd_support.diff ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:16.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:16.000000000 +0200
@@ -1,7 +1,12 @@
+---
+ include/parted/device.h | 3 ++-
+ libparted/arch/linux.c | 3 +++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
Index: include/parted/device.h
===================================================================
---- include/parted/device.h.orig 2009-07-23 19:52:08.000000000 +0200
-+++ include/parted/device.h 2009-07-30 16:24:58.000000000 +0200
+--- include/parted/device.h.orig 2009-11-06 19:31:18.000000000 +0100
++++ include/parted/device.h 2010-02-02 13:10:06.000000000 +0100
@@ -46,7 +46,8 @@ typedef enum {
PED_DEVICE_DM = 12,
PED_DEVICE_XVD = 13,
@@ -14,9 +19,9 @@
typedef struct _PedDevice PedDevice;
Index: libparted/arch/linux.c
===================================================================
---- libparted/arch/linux.c.orig 2009-07-23 19:52:08.000000000 +0200
-+++ libparted/arch/linux.c 2009-07-30 16:24:58.000000000 +0200
-@@ -251,6 +251,7 @@ struct blkdev_ioctl_param {
+--- libparted/arch/linux.c.orig 2009-12-20 12:38:23.000000000 +0100
++++ libparted/arch/linux.c 2010-02-02 13:13:27.000000000 +0100
+@@ -248,6 +248,7 @@ struct blkdev_ioctl_param {
#define I2O_MAJOR7 86
#define I2O_MAJOR8 87
#define UBD_MAJOR 98
@@ -24,24 +29,24 @@
#define DASD_MAJOR 94
#define VIODASD_MAJOR 112
#define SX8_MAJOR1 160
-@@ -530,6 +531,8 @@ _device_probe_type (PedDevice* dev)
+@@ -541,6 +542,8 @@ _device_probe_type (PedDevice* dev)
dev->type = PED_DEVICE_DAC960;
} else if (dev_major == ATARAID_MAJOR && (dev_minor % 0x10 == 0)) {
dev->type = PED_DEVICE_ATARAID;
-+ } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) {
-+ dev->type = PED_DEVICE_AOE;
++ } else if (dev_major == AOE_MAJOR && (dev_minor % 0x10 == 0)) {
++ dev->type = PED_DEVICE_AOE;
} else if (dev_major == DASD_MAJOR && (dev_minor % 0x4 == 0)) {
dev->type = PED_DEVICE_DASD;
} else if (dev_major == VIODASD_MAJOR && (dev_minor % 0x8 == 0)) {
-@@ -1250,6 +1253,11 @@ linux_new (const char* path)
+@@ -1310,6 +1313,11 @@ linux_new (const char* path)
goto error_free_arch_specific;
break;
-+ case PED_DEVICE_AOE:
-+ if (!init_generic (dev, _("AoE Driver")))
-+ goto error_free_arch_specific;
-+ break;
++ case PED_DEVICE_AOE:
++ if (!init_generic (dev, _("AoE Driver")))
++ goto error_free_arch_specific;
++ break;
+
+ #if defined __s390__ || defined __s390x__
case PED_DEVICE_DASD:
if (!init_dasd (dev, _("IBM S390 DASD drive")))
- goto error_free_arch_specific;
++++++ parted-1.9.0.tar.bz2 -> parted-2.2.tar.bz2 ++++++
++++ 216230 lines of diff (skipped)
++++++ parted-gpt-mbr-sync.patch ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:17.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:17.000000000 +0200
@@ -1,10 +1,14 @@
+---
+ libparted/labels/gpt.c | 109 ++++++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 107 insertions(+), 2 deletions(-)
+
Index: libparted/labels/gpt.c
===================================================================
---- libparted/labels/gpt.c.orig 2009-07-23 19:52:08.000000000 +0200
-+++ libparted/labels/gpt.c 2009-07-29 14:36:56.000000000 +0200
-@@ -47,6 +47,11 @@
+--- libparted/labels/gpt.c.orig 2009-12-16 18:01:34.000000000 +0100
++++ libparted/labels/gpt.c 2010-02-02 14:12:46.000000000 +0100
+@@ -50,6 +50,11 @@
# define _(String) (String)
- #endif /* ENABLE_NLS */
+ #endif /* ENABLE_NLS */
+/* IA64 always has a properly working EFI implementation */
+#ifndef __ia64__
@@ -14,146 +18,143 @@
#define EFI_PMBR_OSTYPE_EFI 0xEE
#define MSDOS_MBR_SIGNATURE 0xaa55
-@@ -968,13 +973,62 @@ error:
- return 0;
+@@ -1062,11 +1067,60 @@ error:
+ return 0;
}
++
+#ifdef GPT_SYNC_MBR
+static inline unsigned char
+_part_to_ostype (PedPartition* part)
+{
-+ GPTPartitionData* gpt_part_data = part->disk_specific;
-+ if (part->fs_type) {
-+ if (strncmp (part->fs_type->name, "fat", 3) == 0) return 0xc;
-+ if (strncmp (part->fs_type->name, "ntfs", 4) == 0) return 0x7;
-+ if (strncmp (part->fs_type->name, "hfs", 3) == 0) return 0xaf;
-+ if (strstr (part->fs_type->name, "swap")) return 0x82;
-+ }
-+ return 0x83; // Everything else is Linux
++ if (part->fs_type) {
++ if (strncmp (part->fs_type->name, "fat", 3) == 0) return 0xc;
++ if (strncmp (part->fs_type->name, "ntfs", 4) == 0) return 0x7;
++ if (strncmp (part->fs_type->name, "hfs", 3) == 0) return 0xaf;
++ if (strstr (part->fs_type->name, "swap")) return 0x82;
++ }
++ return 0x83; // Everything else is Linux
+}
+
+static inline PedPartition*
+_find_first_part (const PedDisk* disk)
+{
-+ PedPartition *retval = NULL, *part = NULL;
-+ uint64_t lowest_end = 0xffffffffffffffff;
-+ while (part = ped_disk_next_partition (disk, part)) {
-+ if (part->geom.start == 0 || part->type == PED_PARTITION_METADATA
-+ || part->type == PED_PARTITION_FREESPACE)
-+ continue;
-+ if (part->geom.end < lowest_end) {
-+ retval = part;
-+ lowest_end = part->geom.end;
-+ }
-+ }
-+ return retval;
++ PedPartition *retval = NULL, *part = NULL;
++ uint64_t lowest_end = 0xffffffffffffffff;
++ while (part = ped_disk_next_partition (disk, part)) {
++ if (part->geom.start == 0 || part->type == PED_PARTITION_METADATA
++ || part->type == PED_PARTITION_FREESPACE)
++ continue;
++ if (part->geom.end < lowest_end) {
++ retval = part;
++ lowest_end = part->geom.end;
++ }
++ }
++ return retval;
+}
+
+static inline uint32_t
+_part_32bitmax (uint64_t in)
+{
-+ if (in > 0xFFFFFFFFULL)
-+ return 0xFFFFFFFF;
-+ else
-+ return (uint32_t)in;
++ if (in > 0xFFFFFFFFULL)
++ return 0xFFFFFFFF;
++ else
++ return (uint32_t)in;
+}
+#endif
+
+
-+
#ifndef DISCOVER_ONLY
/* Write the protective MBR (to keep DOS happy) */
static int
--_write_pmbr (PedDevice * dev)
-+_write_pmbr (const PedDisk * disk)
+-_write_pmbr (PedDevice *dev)
++_write_pmbr (const PedDisk *disk)
{
-+ PedDevice * dev = disk->dev;
- LegacyMBR_t pmbr;
-
++ PedDevice * dev = disk->dev;
++
+#ifdef GPT_SYNC_MBR
-+ int i, pmbr_id, first_entry = 0, last_entry = 3;
-+ PedPartition *part = NULL, *esp;
++ int i, pmbr_id, first_entry = 0, last_entry = 3;
++ PedPartition *part = NULL, *esp;
+#endif
+
- /* The UEFI spec is not clear about what to do with the following
- elements of the Protective MBR (pmbr): BootCode (0-440B),
- UniqueMBRSignature (440B-444B) and Unknown (444B-446B).
-@@ -982,11 +1036,14 @@ _write_pmbr (PedDevice * dev)
- if (ped_device_read (dev, &pmbr, 0, GPT_PMBR_SECTORS) < GPT_PMBR_SECTORS)
- memset (&pmbr, 0, sizeof(pmbr));
+ /* The UEFI spec is not clear about what to do with the following
+ elements of the Protective MBR (pmbr): BootCode (0-440B),
+ UniqueMBRSignature (440B-444B) and Unknown (444B-446B).
+@@ -1076,10 +1130,13 @@ _write_pmbr (PedDevice *dev)
+ return 0;
+ LegacyMBR_t *pmbr = s0;
+#ifndef GPT_SYNC_MBR
- /* Zero out all the legacy partitions.
- There are 4 PartitionRecords. */
- memset (pmbr.PartitionRecord, 0, sizeof pmbr.PartitionRecord);
+ /* Zero out the legacy partitions. */
+ memset (pmbr->PartitionRecord, 0, sizeof pmbr->PartitionRecord);
+#endif
- pmbr.Signature = PED_CPU_TO_LE16(MSDOS_MBR_SIGNATURE);
+ pmbr->Signature = PED_CPU_TO_LE16 (MSDOS_MBR_SIGNATURE);
+#ifndef GPT_SYNC_MBR
- pmbr.PartitionRecord[0].OSType = EFI_PMBR_OSTYPE_EFI;
- pmbr.PartitionRecord[0].StartSector = 1;
- pmbr.PartitionRecord[0].EndHead = 0xFE;
-@@ -997,6 +1054,54 @@ _write_pmbr (PedDevice * dev)
- pmbr.PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32(0xFFFFFFFF);
- else
- pmbr.PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32(dev->length - 1UL);
+ pmbr->PartitionRecord[0].OSType = EFI_PMBR_OSTYPE_EFI;
+ pmbr->PartitionRecord[0].StartSector = 1;
+ pmbr->PartitionRecord[0].EndHead = 0xFE;
+@@ -1090,6 +1147,54 @@ _write_pmbr (PedDevice *dev)
+ pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (0xFFFFFFFF);
+ else
+ pmbr->PartitionRecord[0].SizeInLBA = PED_CPU_TO_LE32 (dev->length - 1UL);
+#else
-+ /* Search for an EFI System Partition */
-+ esp = _find_first_part(disk);
-+ if (!esp || !esp->fs_type || strncmp (esp->fs_type->name, "fat", 3) != 0)
-+ esp = NULL;
-+
-+ pmbr_id = 3;
-+ if (esp) {
-+ pmbr_id = 0;
-+ first_entry = 1;
-+ last_entry = 4;
-+ }
-+
-+ /* Write a pseudo-PMBR so Linux is happy */
-+ pmbr.PartitionRecord[pmbr_id].OSType = EFI_PMBR_OSTYPE_EFI;
-+ pmbr.PartitionRecord[pmbr_id].StartSector = 1;
-+ pmbr.PartitionRecord[pmbr_id].EndHead = 0xFE;
-+ pmbr.PartitionRecord[pmbr_id].EndSector = 0xFF;
-+ pmbr.PartitionRecord[pmbr_id].EndTrack = 0xFF;
-+ pmbr.PartitionRecord[pmbr_id].StartingLBA = PED_CPU_TO_LE32(1);
-+ pmbr.PartitionRecord[pmbr_id].SizeInLBA = 1;
-+ if (esp)
-+ pmbr.PartitionRecord[pmbr_id].SizeInLBA = esp->geom.end - 1;
-+
-+ /* sync the first 3 GPT entries to MBR primary partitions */
-+ for (i=first_entry; i < last_entry; i++) {
-+ part = ped_disk_next_partition (disk, part);
-+ if (part == NULL)
-+ break;
-+ /* we might get a starting garbage partition */
-+ if (part->geom.start == 0 || part->type == PED_PARTITION_METADATA || part->type == PED_PARTITION_FREESPACE || part == esp) {
-+ i--;
-+ continue;
-+ }
-+ pmbr.PartitionRecord[i].OSType = _part_to_ostype(part);
-+ pmbr.PartitionRecord[i].StartSector = 1;
-+ pmbr.PartitionRecord[i].StartHead = 0xFE;
-+ pmbr.PartitionRecord[i].StartSector = 0xFF;
-+ pmbr.PartitionRecord[i].StartTrack = 0xFF;
-+ pmbr.PartitionRecord[i].EndHead = 0xFE;
-+ pmbr.PartitionRecord[i].EndSector = 0xFF;
-+ pmbr.PartitionRecord[i].EndTrack = 0xFF;
-+ pmbr.PartitionRecord[i].StartingLBA = _part_32bitmax(part->geom.start);
-+ if(((GPTPartitionData*)part->disk_specific)->boot)
-+ pmbr.PartitionRecord[i].BootIndicator = 0x80;
-+ pmbr.PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start);
-+ }
++ /* Search for an EFI System Partition */
++ esp = _find_first_part(disk);
++ if (!esp || !esp->fs_type || strncmp (esp->fs_type->name, "fat", 3) != 0)
++ esp = NULL;
++
++ pmbr_id = 3;
++ if (esp) {
++ pmbr_id = 0;
++ first_entry = 1;
++ last_entry = 4;
++ }
++
++ /* Write a pseudo-PMBR so Linux is happy */
++ pmbr->PartitionRecord[pmbr_id].OSType = EFI_PMBR_OSTYPE_EFI;
++ pmbr->PartitionRecord[pmbr_id].StartSector = 1;
++ pmbr->PartitionRecord[pmbr_id].EndHead = 0xFE;
++ pmbr->PartitionRecord[pmbr_id].EndSector = 0xFF;
++ pmbr->PartitionRecord[pmbr_id].EndTrack = 0xFF;
++ pmbr->PartitionRecord[pmbr_id].StartingLBA = PED_CPU_TO_LE32(1);
++ pmbr->PartitionRecord[pmbr_id].SizeInLBA = 1;
++ if (esp)
++ pmbr->PartitionRecord[pmbr_id].SizeInLBA = esp->geom.end - 1;
++
++ /* sync the first 3 GPT entries to MBR primary partitions */
++ for (i=first_entry; i < last_entry; i++) {
++ part = ped_disk_next_partition (disk, part);
++ if (part == NULL)
++ break;
++ /* we might get a starting garbage partition */
++ if (part->geom.start == 0 || part->type == PED_PARTITION_METADATA || part->type == PED_PARTITION_FREESPACE || part == esp) {
++ i--;
++ continue;
++ }
++ pmbr->PartitionRecord[i].OSType = _part_to_ostype(part);
++ pmbr->PartitionRecord[i].StartSector = 1;
++ pmbr->PartitionRecord[i].StartHead = 0xFE;
++ pmbr->PartitionRecord[i].StartSector = 0xFF;
++ pmbr->PartitionRecord[i].StartTrack = 0xFF;
++ pmbr->PartitionRecord[i].EndHead = 0xFE;
++ pmbr->PartitionRecord[i].EndSector = 0xFF;
++ pmbr->PartitionRecord[i].EndTrack = 0xFF;
++ pmbr->PartitionRecord[i].StartingLBA = _part_32bitmax(part->geom.start);
++ if(((GPTPartitionData*)part->disk_specific)->boot)
++ pmbr->PartitionRecord[i].BootIndicator = 0x80;
++ pmbr->PartitionRecord[i].SizeInLBA = _part_32bitmax(part->geom.end - part->geom.start);
++ }
+#endif
- return ped_device_write (dev, &pmbr, GPT_PMBR_LBA, GPT_PMBR_SECTORS);
- }
-@@ -1100,7 +1205,7 @@ gpt_write(const PedDisk * disk)
- ptes_crc = efi_crc32 (ptes, ptes_size);
-
- /* Write protective MBR */
-- if (!_write_pmbr (disk->dev))
-+ if (!_write_pmbr (disk))
- goto error_free_ptes;
+ int write_ok = ped_device_write (dev, pmbr, GPT_PMBR_LBA,
+ GPT_PMBR_SECTORS);
+@@ -1204,7 +1309,7 @@ gpt_write (const PedDisk *disk)
+ ptes_crc = efi_crc32 (ptes, ptes_size);
+
+ /* Write protective MBR */
+- if (!_write_pmbr (disk->dev))
++ if (!_write_pmbr (disk))
+ goto error_free_ptes;
- /* Write PTH and PTEs */
+ /* Write PTH and PTEs */
++++++ parted-mac.patch ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:17.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:17.000000000 +0200
@@ -1,8 +1,8 @@
-Index: parted-1.9.0/libparted/disk.c
+Index: parted-2.1/libparted/disk.c
===================================================================
---- parted-1.9.0.orig/libparted/disk.c 2009-07-30 15:22:28.000000000 +0200
-+++ parted-1.9.0/libparted/disk.c 2009-07-30 15:22:50.000000000 +0200
-@@ -969,6 +969,41 @@ _disk_pop_update_mode (PedDisk* disk)
+--- parted-2.1.orig/libparted/disk.c 2010-02-02 11:38:31.000000000 +0100
++++ parted-2.1/libparted/disk.c 2010-02-02 11:39:16.000000000 +0100
+@@ -1178,6 +1178,41 @@ _disk_pop_update_mode (PedDisk* disk)
* @{
*/
@@ -44,12 +44,12 @@
PedPartition*
_ped_partition_alloc (const PedDisk* disk, PedPartitionType type,
const PedFileSystemType* fs_type,
-Index: parted-1.9.0/libparted/labels/mac.c
+Index: parted-2.1/libparted/labels/mac.c
===================================================================
---- parted-1.9.0.orig/libparted/labels/mac.c 2009-07-23 19:52:08.000000000 +0200
-+++ parted-1.9.0/libparted/labels/mac.c 2009-07-30 15:22:50.000000000 +0200
-@@ -1375,6 +1375,36 @@ mac_partition_get_name (const PedPartiti
- return mac_data->volume_name;
+--- parted-2.1.orig/libparted/labels/mac.c 2009-12-16 18:18:13.000000000 +0100
++++ parted-2.1/libparted/labels/mac.c 2010-02-02 11:43:23.000000000 +0100
+@@ -1437,6 +1437,36 @@ mac_get_partition_alignment(const PedDis
+ return ped_alignment_new(0, sector_size);
}
+/* we do not really want to call this ... yet */
@@ -85,16 +85,16 @@
static PedConstraint*
_primary_constraint (PedDisk* disk)
{
-@@ -1599,6 +1629,8 @@ static PedDiskOps mac_disk_ops = {
- partition_is_flag_available: mac_partition_is_flag_available,
+@@ -1640,6 +1670,8 @@ static PedDiskOps mac_disk_ops = {
+
partition_set_name: mac_partition_set_name,
partition_get_name: mac_partition_get_name,
-+ partition_set_system_name: mac_partition_set_system_name,
-+ partition_get_system_name: mac_partition_get_system_name,
- partition_align: mac_partition_align,
- partition_enumerate: mac_partition_enumerate,
++ partition_set_system_name: mac_partition_set_system_name,
++ partition_get_system_name: mac_partition_get_system_name,
+
+ get_partition_alignment: mac_get_partition_alignment,
-@@ -1613,7 +1645,7 @@ static PedDiskType mac_disk_type = {
+@@ -1650,7 +1682,7 @@ static PedDiskType mac_disk_type = {
next: NULL,
name: "mac",
ops: &mac_disk_ops,
@@ -103,11 +103,11 @@
};
void
-Index: parted-1.9.0/include/parted/disk.h
+Index: parted-2.1/include/parted/disk.h
===================================================================
---- parted-1.9.0.orig/include/parted/disk.h 2009-07-30 15:22:28.000000000 +0200
-+++ parted-1.9.0/include/parted/disk.h 2009-07-30 15:22:50.000000000 +0200
-@@ -61,10 +61,11 @@ enum _PedPartitionFlag {
+--- parted-2.1.orig/include/parted/disk.h 2010-02-02 11:38:31.000000000 +0100
++++ parted-2.1/include/parted/disk.h 2010-02-02 11:39:16.000000000 +0100
+@@ -76,10 +76,11 @@ enum _PedPartitionFlag {
enum _PedDiskTypeFeature {
PED_DISK_TYPE_EXTENDED=1, /**< supports extended partitions */
@@ -121,7 +121,7 @@
struct _PedDisk;
struct _PedPartition;
-@@ -212,6 +213,8 @@ struct _PedDiskOps {
+@@ -239,6 +240,8 @@ struct _PedDiskOps {
/* other */
int (*alloc_metadata) (PedDisk* disk);
int (*get_max_primary_partition_count) (const PedDisk* disk);
@@ -129,8 +129,8 @@
+ const char* (*partition_get_system_name) (const PedPartition* part);
bool (*get_max_supported_partition_count) (const PedDisk* disk,
int* supported);
- };
-@@ -288,7 +291,9 @@ extern int ped_partition_is_flag_availab
+ PedAlignment *(*get_partition_alignment)(const PedDisk *disk);
+@@ -325,7 +328,9 @@ extern int ped_partition_is_flag_availab
extern int ped_partition_set_system (PedPartition* part,
const PedFileSystemType* fs_type);
extern int ped_partition_set_name (PedPartition* part, const char* name);
@@ -140,11 +140,11 @@
extern int ped_partition_is_busy (const PedPartition* part);
extern char* ped_partition_get_path (const PedPartition* part);
-Index: parted-1.9.0/parted/parted.c
+Index: parted-2.1/parted/parted.c
===================================================================
---- parted-1.9.0.orig/parted/parted.c 2009-07-30 15:22:28.000000000 +0200
-+++ parted-1.9.0/parted/parted.c 2009-07-30 15:23:47.000000000 +0200
-@@ -1165,6 +1165,7 @@ partition_print_flags (PedPartition* par
+--- parted-2.1.orig/parted/parted.c 2010-02-02 11:38:31.000000000 +0100
++++ parted-2.1/parted/parted.c 2010-02-02 11:39:16.000000000 +0100
+@@ -1235,6 +1235,7 @@ partition_print_flags (PedPartition* par
char* res = ped_malloc(1);
void* _res = res;
int xtype;
@@ -152,7 +152,7 @@
*res = '\0';
-@@ -1201,6 +1202,23 @@ partition_print_flags (PedPartition* par
+@@ -1269,6 +1270,23 @@ partition_print_flags (PedPartition* par
}
}
++++++ parted-remove-experimental-warning.patch ++++++
From 2d81422f3caea30d9d65ec343a34bc1f447a4f01 Mon Sep 17 00:00:00 2001
From: Jim Meyering
Date: Thu, 11 Mar 2010 19:01:41 +0100
Subject: [PATCH] libparted: remove "HIGHLY EXPERIMENTAL" warning for >512B-sector devices
* libparted/arch/linux.c (_device_set_sector_size): Remove the
"HIGHLY EXPERIMENTAL" warning, now that support for >512-byte sectors
seems to be usable. Suggested by Colin Watson.
---
Index: parted-2.2/libparted/arch/linux.c
===================================================================
--- parted-2.2.orig/libparted/arch/linux.c 2010-04-02 09:53:02.000000000 +0200
+++ parted-2.2/libparted/arch/linux.c 2010-04-02 09:53:43.000000000 +0200
@@ -688,16 +688,6 @@ _device_set_sector_size (PedDevice* dev)
dev->sector_size = PED_SECTOR_SIZE_DEFAULT;
}
#endif
-
- if (dev->sector_size != PED_SECTOR_SIZE_DEFAULT) {
- ped_exception_throw (
- PED_EXCEPTION_WARNING,
- PED_EXCEPTION_OK,
- _("Device %s has a logical sector size of %lld. Not "
- "all parts of GNU Parted support this at the moment, "
- "and the working code is HIGHLY EXPERIMENTAL.\n"),
- dev->path, dev->sector_size);
- }
}
static int
++++++ parted-type.patch ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:17.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:17.000000000 +0200
@@ -1,8 +1,16 @@
-Index: parted-1.9.0/libparted/disk.c
+---
+ include/parted/disk.h | 9 +++++----
+ libparted/disk.c | 2 ++
+ libparted/labels/dos.c | 8 ++++++++
+ parted/parted.c | 24 +++++++++++++++++++++---
+ parted/ui.c | 3 +++
+ 5 files changed, 39 insertions(+), 7 deletions(-)
+
+Index: parted-2.1/libparted/disk.c
===================================================================
---- parted-1.9.0.orig/libparted/disk.c 2009-07-30 14:59:14.000000000 +0200
-+++ parted-1.9.0/libparted/disk.c 2009-07-30 14:59:21.000000000 +0200
-@@ -2240,6 +2240,8 @@ ped_partition_flag_get_name (PedPartitio
+--- parted-2.1.orig/libparted/disk.c 2010-02-02 11:57:03.000000000 +0100
++++ parted-2.1/libparted/disk.c 2010-02-02 11:57:14.000000000 +0100
+@@ -2429,6 +2429,8 @@ ped_partition_flag_get_name (PedPartitio
return N_("lba");
case PED_PARTITION_HPSERVICE:
return N_("hp-service");
@@ -11,11 +19,11 @@
case PED_PARTITION_PALO:
return N_("palo");
case PED_PARTITION_PREP:
-Index: parted-1.9.0/libparted/labels/dos.c
+Index: parted-2.1/libparted/labels/dos.c
===================================================================
---- parted-1.9.0.orig/libparted/labels/dos.c 2009-07-30 14:59:14.000000000 +0200
-+++ parted-1.9.0/libparted/labels/dos.c 2009-07-30 14:59:21.000000000 +0200
-@@ -1346,6 +1346,10 @@ msdos_partition_set_flag (PedPartition*
+--- parted-2.1.orig/libparted/labels/dos.c 2010-02-02 11:57:03.000000000 +0100
++++ parted-2.1/libparted/labels/dos.c 2010-02-02 11:57:14.000000000 +0100
+@@ -1397,6 +1397,10 @@ msdos_partition_set_flag (PedPartition*
disk = part->disk;
switch (flag) {
@@ -26,7 +34,7 @@
case PED_PARTITION_HIDDEN:
if (part->type == PED_PARTITION_EXTENDED) {
ped_exception_throw (
-@@ -1443,6 +1447,9 @@ msdos_partition_get_flag (const PedParti
+@@ -1494,6 +1498,9 @@ msdos_partition_get_flag (const PedParti
case PED_PARTITION_LBA:
return dos_data->lba;
@@ -36,7 +44,7 @@
case PED_PARTITION_PALO:
return dos_data->palo;
-@@ -1464,6 +1471,7 @@ msdos_partition_is_flag_available (const
+@@ -1515,6 +1522,7 @@ msdos_partition_is_flag_available (const
case PED_PARTITION_RAID:
case PED_PARTITION_LVM:
case PED_PARTITION_LBA:
@@ -44,43 +52,45 @@
case PED_PARTITION_PALO:
case PED_PARTITION_PREP:
return 1;
-Index: parted-1.9.0/parted/ui.c
+Index: parted-2.1/parted/ui.c
===================================================================
---- parted-1.9.0.orig/parted/ui.c 2009-07-30 14:59:14.000000000 +0200
-+++ parted-1.9.0/parted/ui.c 2009-07-30 14:59:21.000000000 +0200
-@@ -908,6 +908,9 @@ command_line_get_integer (const char* pr
+--- parted-2.1.orig/parted/ui.c 2010-02-02 11:57:03.000000000 +0100
++++ parted-2.1/parted/ui.c 2010-02-02 12:00:01.000000000 +0100
+@@ -918,6 +918,9 @@ command_line_get_integer (const char* pr
NULL, 1);
if (!input)
return 0;
+ if (strstr(input, "0x") == input)
-+ valid = sscanf (input, "%x", value);
-+ else
++ valid = sscanf (input, "%x", value);
++ else
valid = sscanf (input, "%d", value);
free (input);
return valid;
-Index: parted-1.9.0/include/parted/disk.h
+Index: parted-2.1/include/parted/disk.h
===================================================================
---- parted-1.9.0.orig/include/parted/disk.h 2009-07-30 14:59:14.000000000 +0200
-+++ parted-1.9.0/include/parted/disk.h 2009-07-30 14:59:21.000000000 +0200
-@@ -51,9 +51,10 @@ enum _PedPartitionFlag {
+--- parted-2.1.orig/include/parted/disk.h 2010-02-02 11:57:03.000000000 +0100
++++ parted-2.1/include/parted/disk.h 2010-02-02 11:58:02.000000000 +0100
+@@ -65,10 +65,11 @@ enum _PedPartitionFlag {
PED_PARTITION_LBA=7,
PED_PARTITION_HPSERVICE=8,
PED_PARTITION_PALO=9,
- PED_PARTITION_PREP=10,
- PED_PARTITION_MSFT_RESERVED=11,
-- PED_PARTITION_BIOS_GRUB=12
-+ PED_PARTITION_TYPE=10,
+- PED_PARTITION_BIOS_GRUB=12,
+- PED_PARTITION_APPLE_TV_RECOVERY=13
++ PED_PARTITION_TYPE=10,
+ PED_PARTITION_PREP=11,
+ PED_PARTITION_MSFT_RESERVED=12,
-+ PED_PARTITION_BIOS_GRUB=13
++ PED_PARTITION_BIOS_GRUB=13,
++ PED_PARTITION_APPLE_TV_RECOVERY=14
};
#define PED_PARTITION_FIRST_FLAG PED_PARTITION_BOOT
- #define PED_PARTITION_LAST_FLAG PED_PARTITION_BIOS_GRUB
-Index: parted-1.9.0/parted/parted.c
+ #define PED_PARTITION_LAST_FLAG PED_PARTITION_APPLE_TV_RECOVERY
+Index: parted-2.1/parted/parted.c
===================================================================
---- parted-1.9.0.orig/parted/parted.c 2009-07-30 14:59:20.000000000 +0200
-+++ parted-1.9.0/parted/parted.c 2009-07-30 15:13:40.000000000 +0200
-@@ -1164,13 +1164,14 @@ partition_print_flags (PedPartition* par
+--- parted-2.1.orig/parted/parted.c 2010-02-02 11:57:03.000000000 +0100
++++ parted-2.1/parted/parted.c 2010-02-02 11:57:14.000000000 +0100
+@@ -1234,13 +1234,14 @@ partition_print_flags (PedPartition* par
const char* name;
char* res = ped_malloc(1);
void* _res = res;
@@ -96,7 +106,7 @@
if (first_flag)
first_flag = 0;
else {
-@@ -1180,7 +1181,16 @@ partition_print_flags (PedPartition* par
+@@ -1249,7 +1250,16 @@ partition_print_flags (PedPartition* par
res = _res;
strncat (res, ", ", 2);
}
@@ -113,16 +123,16 @@
+ else {
name = _(ped_partition_flag_get_name (flag));
_res = res;
- ped_realloc (&_res, strlen (res) + 1
-@@ -1189,6 +1199,7 @@ partition_print_flags (PedPartition* par
- strncat (res, name, 21);
+ ped_realloc (&_res, strlen (res) + 1 + strlen (name));
+@@ -1257,6 +1267,7 @@ partition_print_flags (PedPartition* par
+ strcat(res, name);
}
}
+ }
return res;
}
-@@ -1940,12 +1951,19 @@ do_set (PedDevice** dev)
+@@ -2057,12 +2068,19 @@ do_set (PedDevice** dev)
goto error_destroy_disk;
if (!command_line_get_part_flag (_("Flag to Invert?"), part, &flag))
goto error_destroy_disk;
++++++ parted-wipeaix.patch ++++++
--- /var/tmp/diff_new_pack.a67qeI/_old 2010-04-03 00:13:17.000000000 +0200
+++ /var/tmp/diff_new_pack.a67qeI/_new 2010-04-03 00:13:17.000000000 +0200
@@ -1,36 +1,19 @@
-Index: parted-1.9.0/libparted/labels/dos.c
+Index: parted-2.1/libparted/labels/dos.c
===================================================================
---- parted-1.9.0.orig/libparted/labels/dos.c 2009-07-29 11:31:18.000000000 +0200
-+++ parted-1.9.0/libparted/labels/dos.c 2009-07-29 11:36:43.000000000 +0200
-@@ -54,6 +54,8 @@ static const char MBR_BOOT_CODE[] = {
- #define MSDOS_MAGIC 0xAA55
- #define PARTITION_MAGIC_MAGIC 0xf6f6
+--- parted-2.1.orig/libparted/labels/dos.c 2010-02-02 13:26:28.000000000 +0100
++++ parted-2.1/libparted/labels/dos.c 2010-02-02 13:28:15.000000000 +0100
+@@ -1187,7 +1187,13 @@ msdos_write (const PedDisk* disk)
+ return 0;
+ DosRawTable *table = (DosRawTable *) s0;
-+#define AIXIPLRECID 0xc9c2d4c1 /* Value is EBCIDIC 'IBMA' */
-+
- #define PARTITION_EMPTY 0x00
- #define PARTITION_FAT12 0x01
- #define PARTITION_FAT16_SM 0x04
-@@ -193,6 +195,10 @@ msdos_probe (const PedDevice *dev)
- if (PED_LE16_TO_CPU (part_table->magic) != MSDOS_MAGIC)
- goto probe_fail;
-
-+ /* Is this an AIX IPL label? Then just go away. */
-+ if (PED_BE32_TO_CPU (*(unsigned int*)(part_table->boot_code)) == AIXIPLRECID)
-+ goto probe_fail;
-+
- /* If this is a FAT fs, fail here. Checking for the FAT signature
- * has some false positives; instead, do what the Linux kernel does
- * and ensure that each partition has a boot indicator that is
-@@ -1142,7 +1148,10 @@ msdos_write (const PedDisk* disk)
-
- ped_device_read (disk->dev, &table, 0, 1);
-
-- if (!table.boot_code[0]) {
+- if (!table->boot_code[0]) {
+ /* either no bootrecord at all, or AIX IPL signature ... */
-+ if ((!table.boot_code[0]) ||
-+ (PED_BE32_TO_CPU (*(unsigned int*)(table.boot_code)) == AIXIPLRECID)
-+ ) {
- memset (table.boot_code, 0, 512);
- memcpy (table.boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
++ if ( (!table->boot_code[0]) ||
++ ( table->boot_code[0] == (char) 0xc9 &&
++ table->boot_code[1] == (char) 0xc2 &&
++ table->boot_code[2] == (char) 0xd4 &&
++ table->boot_code[3] == (char) 0xc1)
++ ) {
+ memset (table->boot_code, 0, 512);
+ memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org