[parted-devel] Sector size warning message

David Cantrell dcantrell at redhat.com
Tue Apr 11 17:26:12 UTC 2006


leslie.polzer at gmx.net wrote:
> On Mon, Apr 10, 2006 at 03:32:19PM -0400, David Cantrell wrote:
> 
> > Both 'Ignore' and 'Cancel' are bad words to use here. Does anyone have
> > any suggestions for better wording on this message?
> I do not have any better wording (the main problem seems to be the
> limited choices offered by the Parted exception system), so it would
> probably be best to explain the misnamed choices.

Yeah, it is a bit limited.  I changed it around to ask a yes/no
question.  Patch attached.  Soliciting comments.  This is super simple
and different than my original idea.

>   Another possibility would be aborting the program.  Both choices are
> quite dangerous, and 1.7 has better support for big blocks.

1.7 isn't an option for me here.  This change is to go in to the next
update release of Red Hat Enterprise Linux, so I have to patch what's
there.  1.7 is looking nice.

-- 
David Cantrell
Red Hat / Westford, MA
-------------- next part --------------
--- parted-1.6.19/libparted/linux.c.secsz	2006-04-11 11:17:26.000000000 -0400
+++ parted-1.6.19/libparted/linux.c	2006-04-11 11:21:20.000000000 -0400
@@ -394,14 +394,15 @@
 	if (sector_size != PED_SECTOR_SIZE) {
 		if (ped_exception_throw (
 			PED_EXCEPTION_BUG,
-			PED_EXCEPTION_IGNORE_CANCEL,
+			PED_EXCEPTION_YES_NO,
 			_("The sector size on %s is %d bytes.  Parted is known "
 			"not to work properly with drives with sector sizes "
-			"other than %d bytes"),
+			"other than %d bytes.  Use %d sector size?"),
 			dev->path,
 			sector_size,
-			PED_SECTOR_SIZE)
-				== PED_EXCEPTION_IGNORE)
+			PED_SECTOR_SIZE,
+			sector_size)
+				== PED_EXCEPTION_YES)
 			return sector_size;
 		else
 			return PED_SECTOR_SIZE;


More information about the parted-devel mailing list