]> git.pld-linux.org Git - packages/parted.git/blob - 0087-Fix-resizepart-iec-unit-end-sector.patch
- release 6 (by relup.sh)
[packages/parted.git] / 0087-Fix-resizepart-iec-unit-end-sector.patch
1 From 247e3fc6cd8bca79b7c0362886ae9b5b06ba6f8c Mon Sep 17 00:00:00 2001
2 From: Phillip Susi <psusi@ubuntu.com>
3 Date: Thu, 12 May 2016 21:38:51 -0400
4 Subject: [PATCH 87/92] Fix resizepart iec unit end sector
5
6 Fix resizepart to adjust the end to be -1 sector when using iec
7 power of 2 units so that the next partition can start immediately
8 following the new end, just like mkpart does.
9 ---
10  parted/parted.c | 5 ++++-
11  2 files changed, 8 insertions(+), 1 deletion(-)
12
13 diff --git a/parted/parted.c b/parted/parted.c
14 index 88f32b9..267c346 100644
15 --- a/parted/parted.c
16 +++ b/parted/parted.c
17 @@ -1567,8 +1567,11 @@ do_resizepart (PedDevice** dev, PedDisk** diskp)
18  
19          start = part->geom.start;
20          end = oldend = part->geom.end;
21 -        if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, NULL))
22 +        char *end_input;
23 +        if (!command_line_get_sector (_("End?"), *dev, &end, &range_end, &end_input))
24                  goto error;
25 +        _adjust_end_if_iec(&start, &end, range_end, end_input);
26 +        free(end_input);
27          /* Do not move start of the partition */
28          constraint = constraint_from_start_end_fixed_start (*dev, start, range_end);
29          if (!ped_disk_set_partition_geom (disk, part, constraint,
30 -- 
31 2.17.1
32
This page took 0.025492 seconds and 3 git commands to generate.