parted/0089-Lift-512-byte-restriction-on-fat-resize.patch
Brian C. Lane d6652ea632 - Use python3 in buildroot
- Add make to BuildRequires
- Switch gpt-header-move and msdos-overlap to python3 (bcl)
- Modify gpt-header-move and msdos-overlap to work with py2 or py3 (bcl)
- Fix atari label false positives (psusi)
- Lift 512 byte restriction on fat resize (psusi)
- build: Remove unused traces of dynamic loading (cjwatson)
- Fix resizepart iec unit end sector (psusi)
- mkpart: Allow negative start value when FS-TYPE is not given (mail)
- Fix set and disk_set to not crash when no flags are supported (psusi)
- tests: fix t6100-mdraid-partitions (psusi)
- Fix make check (psusi)
- linux: Include <sys/sysmacros.h> for major() macro. (rjones)
2018-06-27 14:44:42 -07:00

53 lines
1.7 KiB
Diff

From 4347ddb8e2dd01674c759e94eaaf5872915a2e48 Mon Sep 17 00:00:00 2001
From: Phillip Susi <psusi@ubuntu.com>
Date: Fri, 4 May 2018 10:57:56 -0400
Subject: [PATCH 89/92] Lift 512 byte restriction on fat resize
As Colin Watson pointed out way back in 2014, when I removed the
512 byte sector size restriction from the fs recognition code,
I missed the same from the fat resize code.
---
NEWS | 2 ++
libparted/fs/r/fat/bootsector.c | 12 ------------
2 files changed, 2 insertions(+), 12 deletions(-)
diff --git a/NEWS b/NEWS
index 83352a6..552e319 100644
--- a/NEWS
+++ b/NEWS
@@ -45,6 +45,8 @@ GNU parted NEWS -*- outline -*-
** New Features
+ libparted-fs-resize: Work on non 512 byte sectors.
+
Add resizepart command to resize a partition. This works even on
mounted partitions.
diff --git a/libparted/fs/r/fat/bootsector.c b/libparted/fs/r/fat/bootsector.c
index 99d788d..3e34e13 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);
--
2.17.1