From: Karel Zak Date: Wed, 10 Jun 2026 08:52:44 +0000 (+0200) Subject: fdisk: (resize) avoid redundant error on partnum failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a325aefa05e45719bcf7bec118b7d9ba8acdc8f5;p=thirdparty%2Futil-linux.git fdisk: (resize) avoid redundant error on partnum failure fdisk_ask_partnum() already prints its own diagnostics on failure, so go directly to 'out' instead of 'err' which would print a redundant "Could not resize partition" message with a meaningless partition number. Also removes the need for the i=0 initialization from the previous commit, since 'i' is no longer used on the fdisk_ask_partnum() error path. Addresses: https://github.com/util-linux/util-linux/pull/4394 Signed-off-by: Karel Zak --- diff --git a/disk-utils/fdisk.c b/disk-utils/fdisk.c index a593487ca..1fc112c05 100644 --- a/disk-utils/fdisk.c +++ b/disk-utils/fdisk.c @@ -691,7 +691,7 @@ void resize_partition(struct fdisk_context *cxt) rc = fdisk_ask_partnum(cxt, &i, FALSE); if (rc) - goto err; + goto out; rc = fdisk_partition_get_max_size(cxt, i, &max_size); if (rc)