]> git.ipfire.org Git - thirdparty/util-linux.git/commit - disk-utils/fdisk.c
fdisk: add 'T' command to discard sectors
authorKarel Zak <kzak@redhat.com>
Tue, 16 Apr 2024 11:36:32 +0000 (13:36 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 17 Apr 2024 07:38:52 +0000 (09:38 +0200)
commita4c0dce86bcdb3a785667ea1f96ed4127fa0d545
tree0f34afc1695fbbb5bcd54cf60893643c495ebc9f
parent7817415a5538354dfa24532f3420bfd3e74df795
fdisk: add 'T' command to discard sectors

We currently have blkdiscard(8), but it can be difficult to use for
unpartitioned areas or for partitions when working with a whole-disk
device.

This commit adds BLKDISCARD support to fdisk, so that the user does
not have to specify any range, but instead follows the partition
table.

Addresses: https://github.com/util-linux/util-linux/issues/2804
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/fdisk-menu.c
disk-utils/fdisk.c
disk-utils/fdisk.h