From: Lennart Poettering Date: Mon, 20 Oct 2025 14:13:31 +0000 (+0200) Subject: repart: switch things over to our own partition reread logic X-Git-Tag: v259-rc1~259^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46da450f139487e62efc2f566fe7c1536648ee75;p=thirdparty%2Fsystemd.git repart: switch things over to our own partition reread logic --- diff --git a/src/repart/repart.c b/src/repart/repart.c index 0af92eea61c..1ca825f39dc 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -65,6 +65,7 @@ #include "process-util.h" #include "random-util.h" #include "ratelimit.h" +#include "reread-partition-table.h" #include "resize-fs.h" #include "rm-rf.h" #include "set.h" @@ -7270,12 +7271,8 @@ static int context_write_partition_table(Context *context) { else if (capable < 0) return log_error_errno(capable, "Failed to check if block device supports partition scanning: %m"); else if (capable > 0) { - log_info("Telling kernel to reread partition table."); - - if (context->from_scratch) - r = fdisk_reread_partition_table(context->fdisk_context); - else - r = fdisk_reread_changes(context->fdisk_context, original_table); + log_info("Informing kernel about changed partitions..."); + r = reread_partition_table_fd(fdisk_get_devfd(context->fdisk_context), /* flags= */ 0); if (r < 0) return log_error_errno(r, "Failed to reread partition table: %m"); } else