]> git.pld-linux.org Git - packages/parted.git/blob - 0089-Lift-512-byte-restriction-on-fat-resize.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0089-Lift-512-byte-restriction-on-fat-resize.patch
1 From 4347ddb8e2dd01674c759e94eaaf5872915a2e48 Mon Sep 17 00:00:00 2001
2 From: Phillip Susi <psusi@ubuntu.com>
3 Date: Fri, 4 May 2018 10:57:56 -0400
4 Subject: [PATCH 89/92] Lift 512 byte restriction on fat resize
5
6 As Colin Watson pointed out way back in 2014, when I removed the
7 512 byte sector size restriction from the fs recognition code,
8 I missed the same from the fat resize code.
9 ---
10  NEWS                            |  2 ++
11  libparted/fs/r/fat/bootsector.c | 12 ------------
12  2 files changed, 2 insertions(+), 12 deletions(-)
13
14 diff --git a/NEWS b/NEWS
15 index 83352a6..552e319 100644
16 --- a/NEWS
17 +++ b/NEWS
18 @@ -45,6 +45,8 @@ GNU parted NEWS                                    -*- outline -*-
19  
20  ** New Features
21  
22 +  libparted-fs-resize: Work on non 512 byte sectors.
23 +
24    Add resizepart command to resize a partition.  This works even on
25    mounted partitions.
26  
27 diff --git a/libparted/fs/r/fat/bootsector.c b/libparted/fs/r/fat/bootsector.c
28 index 99d788d..3e34e13 100644
29 --- a/libparted/fs/r/fat/bootsector.c
30 +++ b/libparted/fs/r/fat/bootsector.c
31 @@ -125,18 +125,6 @@ fat_boot_sector_analyse (FatBootSector* bs, PedFileSystem* fs)
32  
33         PED_ASSERT (bs != NULL);
34  
35 -       if (PED_LE16_TO_CPU (bs->sector_size) != 512) {
36 -               if (ped_exception_throw (
37 -                       PED_EXCEPTION_BUG,
38 -                       PED_EXCEPTION_IGNORE_CANCEL,
39 -                       _("This file system has a logical sector size of %d.  "
40 -                       "GNU Parted is known not to work properly with sector "
41 -                       "sizes other than 512 bytes."),
42 -                       (int) PED_LE16_TO_CPU (bs->sector_size))
43 -                               != PED_EXCEPTION_IGNORE)
44 -                       return 0;
45 -       }
46 -
47         fs_info->logical_sector_size = PED_LE16_TO_CPU (bs->sector_size) / 512;
48  
49         fs_info->sectors_per_track = PED_LE16_TO_CPU (bs->secs_track);
50 -- 
51 2.17.1
52
This page took 0.062231 seconds and 3 git commands to generate.