[parted-devel] FAT resizing spuriously requires logical sector size of 512?

Colin Watson cjwatson at debian.org
Wed Jul 30 11:17:09 UTC 2014


Hi,

While rebasing the Debian patch stack to 3.2, I noticed that, even
though http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16338 removed the
logical-sector-size-512 assertion from one copy of
fat_boot_sector_analyse, it didn't remove it from the other one in the
resizing code.  Was this intentional, or is it a mistake?  Something
like this seems appropriate given the other changes to that file:

diff --git a/libparted/fs/r/fat/bootsector.c b/libparted/fs/r/fat/bootsector.c
index 1d2b601..683b986 100644
--- a/libparted/fs/r/fat/bootsector.c
+++ b/libparted/fs/r/fat/bootsector.c
@@ -125,18 +125,6 @@ fat_boot_sector_analyse (FatBootSector* bs, PedFileSystem* fs)
 
 	PED_ASSERT (bs != NULL);
 
-	if (PED_LE16_TO_CPU (bs->sector_size) != 512) {
-		if (ped_exception_throw (
-			PED_EXCEPTION_BUG,
-			PED_EXCEPTION_IGNORE_CANCEL,
-			_("This file system has a logical sector size of %d.  "
-			"GNU Parted is known not to work properly with sector "
-			"sizes other than 512 bytes."),
-			(int) PED_LE16_TO_CPU (bs->sector_size))
-				!= PED_EXCEPTION_IGNORE)
-			return 0;
-	}
-
 	fs_info->logical_sector_size = PED_LE16_TO_CPU (bs->sector_size) / 512;
 
 	fs_info->sectors_per_track = PED_LE16_TO_CPU (bs->secs_track);

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the parted-devel mailing list