[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Thu Mar 11 18:45:07 UTC 2010


 NEWS                   |   13 +++++++++++++
 libparted/arch/linux.c |   10 ----------
 libparted/labels/dos.c |   10 +++++++++-
 3 files changed, 22 insertions(+), 11 deletions(-)

New commits:
commit 2d81422f3caea30d9d65ec343a34bc1f447a4f01
Author: Jim Meyering <meyering at redhat.com>
Date:   Thu Mar 11 19:01:41 2010 +0100

    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.
    * NEWS (Changes in behavior): Note this

diff --git a/NEWS b/NEWS
index 77a10ca..1c7ad4a 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,12 @@ GNU parted NEWS                                    -*- outline -*-
   Similarly, msdos_partition_get_flag(p,PED_PARTITION_HIDDEN) always returns 0
   for an extended partition.
 
+** Changes in behavior
+
+  libparted no longer issues an exception/warning about >512-byte
+  sector support being "HIGHLY EXPERIMENTAL".  It seems to have matured
+  enough to be usable at least with GPT and MSDOS partition tables.
+
 
 * Noteworthy changes in release 2.2 (2010-02-26) [stable]
 
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 23d5b71..c75cf9e 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -687,16 +687,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

commit 737ff191283d660401edb0422df707a9412e79af
Author: David Cantrell <dcantrell at redhat.com>
Date:   Tue Mar 2 09:58:18 2010 +0100

    libparted: msdos_partition_is_flag_available: fix hidden on extended
    
    Since the hidden flag cannot be set on extended partitions,
    msdos_partition_is_flag_available() should return 0 for hidden on
    extended partitions. Also change msdos_partition_get_flag()
    to always return 0 for hidden on extended partitions.
    * libparted/labels/dos.c (msdos_partition_is_flag_available):
    Return 0 for hidden on extended partitions.
    * libparted/labels/dos.c (msdos_partition_get_flag):
    Always return 0 for hidden on extended partitions.
    * NEWS (Bug fixes): Mention it.
    Reported by Flóki Pálsson in http://bugzilla.redhat.com/567118
    Patch forwarded by Hans De Goede.

diff --git a/NEWS b/NEWS
index f6662c8..77a10ca 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,13 @@ GNU parted NEWS                                    -*- outline -*-
 
   parted now recognizes ATA over Ethernet (AoE) devices
 
+** Bug fixes
+
+  libparted's msdos_partition_is_flag_available function now always reports
+  that the "hidden" flag is not available for an extended partition.
+  Similarly, msdos_partition_get_flag(p,PED_PARTITION_HIDDEN) always returns 0
+  for an extended partition.
+
 
 * Noteworthy changes in release 2.2 (2010-02-26) [stable]
 
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index b83bcc2..6fb4aef 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -1467,7 +1467,10 @@ msdos_partition_get_flag (const PedPartition* part, PedPartitionFlag flag)
 	dos_data = part->disk_specific;
 	switch (flag) {
 	case PED_PARTITION_HIDDEN:
-		return dos_data->hidden;
+		if (part->type == PED_PARTITION_EXTENDED)
+			return 0;
+		else
+			return dos_data->hidden;
 
 	case PED_PARTITION_BOOT:
 		return dos_data->boot;
@@ -1498,6 +1501,11 @@ msdos_partition_is_flag_available (const PedPartition* part,
 {
 	switch (flag) {
 	case PED_PARTITION_HIDDEN:
+		if (part->type == PED_PARTITION_EXTENDED)
+			return 0;
+		else
+			return 1;
+
 	case PED_PARTITION_BOOT:
 	case PED_PARTITION_RAID:
 	case PED_PARTITION_LVM:



More information about the Parted-commits mailing list