diff options
author | Karel Zak | 2014-11-20 13:11:38 +0100 |
---|---|---|
committer | Karel Zak | 2014-11-20 13:11:38 +0100 |
commit | 333c3761383d6dd166f032080055e9333b09628c (patch) | |
tree | f8d1552c10c100c40411edc9bf8da2e1a0ca60cb /disk-utils/sfdisk.c | |
parent | aggety: always set default serial line speed (diff) | |
download | kernel-qcow2-util-linux-333c3761383d6dd166f032080055e9333b09628c.tar.gz kernel-qcow2-util-linux-333c3761383d6dd166f032080055e9333b09628c.tar.xz kernel-qcow2-util-linux-333c3761383d6dd166f032080055e9333b09628c.zip |
libfdisk: (dos) allow to maximize partition
The struct fdisk_partition has special flag "end_follow_default" to
make the partition large as much as possible. This patch makes this
flag usable for fdisk_set_partition() function.
Command line example (enlarge the first partition):
# echo ',+' | ./sfdisk -N1 /dev/sdb
...
Disk /dev/sdb: 100 MiB, 104857600 bytes, 204800 sectors
...
Old situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 22527 20480 10M 83 Linux
^^^^^
New situation:
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 204799 202752 99M 83 Linux
^^^^^^
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/sfdisk.c')
-rw-r--r-- | disk-utils/sfdisk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/disk-utils/sfdisk.c b/disk-utils/sfdisk.c index f48d1c743..b22ee40ae 100644 --- a/disk-utils/sfdisk.c +++ b/disk-utils/sfdisk.c @@ -936,6 +936,8 @@ static void command_fdisk_help(void) fputs(_(" abort exit sfdisk shell\n"), stdout); fputs(_(" print print partition table.\n"), stdout); fputs(_(" help this help.\n"), stdout); + fputc('\n', stdout); + fputs(_(" CTRL-D the same like 'quit' command\n"), stdout); fputc('\n', stdout); color_scheme_enable("help-title", UL_COLOR_BOLD); |