diff options
author | Karel Zak | 2015-02-03 12:44:00 +0100 |
---|---|---|
committer | Karel Zak | 2015-02-03 12:44:00 +0100 |
commit | 1bb387bdbd25b241929ddf5e28f187f4968677a1 (patch) | |
tree | a502fec5126095b61d8913c6fe05649bd1c8019e /disk-utils | |
parent | libfdisk: (dos) write new empty label too (diff) | |
download | kernel-qcow2-util-linux-1bb387bdbd25b241929ddf5e28f187f4968677a1.tar.gz kernel-qcow2-util-linux-1bb387bdbd25b241929ddf5e28f187f4968677a1.tar.xz kernel-qcow2-util-linux-1bb387bdbd25b241929ddf5e28f187f4968677a1.zip |
libfdisk: fix issues with very small partitions
- cfdisk: minimal partitions size is 1 sector
- dos: when align last sector then don't set partition size to zero
for very small partitions.
- don't ignore tiny partitions before free space when define
free-space start offset
- improve some debug messages
Reported-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | disk-utils/cfdisk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/disk-utils/cfdisk.c b/disk-utils/cfdisk.c index eec8eba6e..911b6c8b4 100644 --- a/disk-utils/cfdisk.c +++ b/disk-utils/cfdisk.c @@ -1964,8 +1964,9 @@ static int main_menu_action(struct cfdisk *cf, int key) start = fdisk_partition_get_start(pa); size = dflt_size = fdisk_partition_get_size(pa) * fdisk_get_sector_size(cf->cxt); - if (ui_get_size(cf, _("Partition size: "), &size, 1, size, &expsize) - == -CFDISK_ERR_ESC) + if (ui_get_size(cf, _("Partition size: "), &size, + fdisk_get_sector_size(cf->cxt), + size, &expsize) == -CFDISK_ERR_ESC) break; secs = size / fdisk_get_sector_size(cf->cxt); |