diff options
author | Phillip Susi <psusi@ubuntu.com> | 2015-01-12 19:06:11 -0500 |
---|---|---|
committer | Phillip Susi <psusi@ubuntu.com> | 2016-04-10 21:45:50 -0400 |
commit | e09c30fb53179319ba1543813b5b4024e923b795 (patch) | |
tree | 99cdf1ea866b83fb5e3d188fe5a38990844700f9 /parted | |
parent | 61dd3d4c5eb782eb43caa95342e63727db3f8281 (diff) | |
download | parted-e09c30fb53179319ba1543813b5b4024e923b795.tar.gz |
parted: fix the rescue command
The rescue command often failed to locate a filesystem due to it
leaving cylinder alignment on, which snapped the allowed bounds
of the filesystem down to the next lower cylinder boundary,
causing the detected filesystem to be rejected due to not fitting.
Diffstat (limited to 'parted')
-rw-r--r-- | parted/parted.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parted/parted.c b/parted/parted.c index a9426c4..2c23249 100644 --- a/parted/parted.c +++ b/parted/parted.c @@ -1472,6 +1472,10 @@ do_rescue (PedDevice** dev, PedDisk** diskp) disk = ped_disk_new (*dev); if (!disk) goto error; + if (ped_disk_is_flag_available(disk, PED_DISK_CYLINDER_ALIGNMENT)) + if (!ped_disk_set_flag(disk, PED_DISK_CYLINDER_ALIGNMENT, + 0)) + goto error; if (!command_line_get_sector (_("Start?"), *dev, &start, NULL, NULL)) goto error_destroy_disk; |