Commit Graph

13 Commits

Author SHA1 Message Date
Karel Zak c1154128db fdisk: fix readline interaction with signals
The high-level readline API is crazy to use with signals. Fortunately
the library provides low-level rl_callback_* API. In this case we can
use poll() to wait for input and control all signals, etc.

This patch also a little changes fdisk behavior on CTRL+C and CTRL+D.
The signals does not kill fdisk, but forces fdisk to return to the
main menu, if already in the main menu then exit. If the disk layout
has been modified than ask "Do you really want to exit...".

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-24 15:48:46 +02:00
Karel Zak fadd8e0877 fdisk: use fdisk_reread_changes()
Let's make fdisk usable for disks where some partitions are mounted.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-14 11:34:55 +02:00
Karel Zak 5635d19550 fdisk: improve --wipe functionality
* always (except --wipe=never) wipe old partition tables
* improve warn messages
* improve man page

Addresses: https://github.com/karelzak/util-linux/issues/410
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-14 15:13:35 +01:00
Karel Zak ba465623d8 fdisk: add --wipe-partitions=auto|never|default
The option allows to remove filesystes/RAIDs from newly created
partitions before the partition table is updated (and partition
device created).

The default is "auto" in this case wipe is enabled in interactive mode
only and user's confirmation (yes/no dialog) is required. Note that
keep filesystem signature on partition is pretty valid use-case, so we
don't erase anything by default.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-05-04 12:43:35 +02:00
Karel Zak 4bd02cdfdf libfdisk: fix fdisk_label_parse_parttype() for unknown types
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-07-15 15:42:22 +02:00
Jean-Loup 'clippix' Bogalho 3e3b51b3b1 fdisk: add the 'i'nfo command
Add the 'i'nfo command to fdisk that prints details about a specific partition.
Details are everything the function 'fdisk_label_get_field' can return.

Signed-off-by: Jean-Loup 'clippix' Bogalho <clippix@lse.epita.fr>
2015-05-11 12:26:30 +02:00
Karel Zak fdb006e8b5 fdisk: move --list functionality to separated file
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 14:55:30 +02:00
Karel Zak e6d0c4c1ac fdisk: add independent debug stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-08-15 12:38:02 +02:00
Karel Zak 4ddd86d5d9 build-sys: ove fdisks to disk-utils
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-03-11 11:35:15 +01:00
Karel Zak 5c36a0eb7c Imported from util-linux-2.9i tarball. 2006-12-07 00:25:37 +01:00
Karel Zak 2b6fc908bc Imported from util-linux-2.8 tarball. 2006-12-07 00:25:35 +01:00
Karel Zak fd6b7a7ffc Imported from util-linux-2.7.1 tarball. 2006-12-07 00:25:34 +01:00
Karel Zak 726f69e29c Imported from util-linux-2.5 tarball. 2006-12-07 00:25:33 +01:00