summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/libfdisk.h.in
diff options
context:
space:
mode:
authorKarel Zak2017-07-14 10:51:14 +0200
committerKarel Zak2017-07-14 11:34:55 +0200
commit1dd63a3b05acd7640c688f9535508417fac950d1 (patch)
tree245abf4c0da52ec0d169dddd558b960e10526c7b /libfdisk/src/libfdisk.h.in
parentpartx: move partx.h to include/ (diff)
downloadkernel-qcow2-util-linux-1dd63a3b05acd7640c688f9535508417fac950d1.tar.gz
kernel-qcow2-util-linux-1dd63a3b05acd7640c688f9535508417fac950d1.tar.xz
kernel-qcow2-util-linux-1dd63a3b05acd7640c688f9535508417fac950d1.zip
libfdisk: use BLKPG ioctls to inform kernel about changes
This patch introduces fdisk_reread_changes(). The function is less invasive alternative to fdisk_reread_partition_table(). The new function uses BLKPG ioctls for modified partitions. The another partitions are not affected. This solution allows to successfully use fdisks on disk where some partitions are still use (mounted). For example if you want to resize the last partition on the device. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/libfdisk.h.in')
-rw-r--r--libfdisk/src/libfdisk.h.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in
index c00e1c072..54418cd90 100644
--- a/libfdisk/src/libfdisk.h.in
+++ b/libfdisk/src/libfdisk.h.in
@@ -459,6 +459,7 @@ extern int fdisk_table_remove_partition(struct fdisk_table *tb, struct fdisk_par
extern int fdisk_get_partitions(struct fdisk_context *cxt, struct fdisk_table **tb);
extern int fdisk_get_freespaces(struct fdisk_context *cxt, struct fdisk_table **tb);
+
extern int fdisk_table_wrong_order(struct fdisk_table *tb);
extern int fdisk_table_sort_partitions(struct fdisk_table *tb,
int (*cmp)(struct fdisk_partition *,
@@ -503,6 +504,7 @@ int fdisk_has_user_device_properties(struct fdisk_context *cxt);
int fdisk_reset_alignment(struct fdisk_context *cxt);
int fdisk_reset_device_properties(struct fdisk_context *cxt);
int fdisk_reread_partition_table(struct fdisk_context *cxt);
+int fdisk_reread_changes(struct fdisk_context *cxt, struct fdisk_table *org);
/* iter.c */
enum {