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

Jim Meyering meyering at alioth.debian.org
Fri Apr 9 16:25:59 UTC 2010


 libparted/labels/pt-tools.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0fb5838f39c2c16ec72775e00702689f4b84f5c1
Author: Colin Watson <cjwatson at ubuntu.com>
Date:   Fri Apr 9 13:22:27 2010 +0100

    libparted: fix diagnostics about exceeding partition limits
    
    * libparted/labels/pt-tools.c (ptt_partition_max_start_len): Use the
    correct value in the diagnostics that print the upper bound on
    partition size and largest starting sector number.  Before, each
    would use UINT32_MAX.  Now each prints the partition-table-specific
    limit.

diff --git a/libparted/labels/pt-tools.c b/libparted/labels/pt-tools.c
index 9992529..ff3186d 100644
--- a/libparted/labels/pt-tools.c
+++ b/libparted/labels/pt-tools.c
@@ -127,7 +127,7 @@ ptt_partition_max_start_len (char const *pt_type, const PedPartition *part)
 			     " of %jd"),
 			   part->geom.length,
 			   pt_type,
-			   UINT32_MAX);
+			   pt_lim->max_length);
       return 0;
     }
 
@@ -140,7 +140,7 @@ ptt_partition_max_start_len (char const *pt_type, const PedPartition *part)
 			   " of %jd"),
 			 part->geom.start,
 			 pt_type,
-			 UINT32_MAX);
+			 pt_lim->max_start_sector);
     return 0;
   }
 



More information about the Parted-commits mailing list