From: Daan De Meyer Date: Mon, 2 Jun 2025 14:02:58 +0000 (+0200) Subject: repart: Improve logging in resolve_copy_blocks_auto() X-Git-Tag: v258-rc1~413 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66772511d60d361bc223569f65b8e03516ae781f;p=thirdparty%2Fsystemd.git repart: Improve logging in resolve_copy_blocks_auto() --- diff --git a/src/repart/repart.c b/src/repart/repart.c index 4d0609bbe8d..2e0efb45a33 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -7316,16 +7316,16 @@ static int resolve_copy_blocks_auto( default: return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), - "Partition type " SD_ID128_FORMAT_STR " not supported from automatic source block device discovery.", - SD_ID128_FORMAT_VAL(type.uuid)); + "Partition type %s not supported from automatic source block device discovery.", + strna(partition_designator_to_string(type.designator))); } r = find_backing_devno(try1, root, &devno); if (r == -ENOENT && try2) r = find_backing_devno(try2, root, &devno); if (r < 0) - return log_error_errno(r, "Failed to resolve automatic CopyBlocks= path for partition type " SD_ID128_FORMAT_STR ", sorry: %m", - SD_ID128_FORMAT_VAL(type.uuid)); + return log_error_errno(r, "Failed to resolve automatic CopyBlocks= path for partition type %s, sorry: %m", + partition_designator_to_string(type.designator)); xsprintf_sys_block_path(p, "/slaves", devno); d = opendir(p); @@ -7374,7 +7374,8 @@ static int resolve_copy_blocks_auto( /* We found a matching one! */ if (found != 0) return log_error_errno(SYNTHETIC_ERRNO(ENOTUNIQ), - "Multiple matching partitions found, refusing."); + "Multiple matching partitions found for partition type %s, refusing.", + partition_designator_to_string(type.designator)); found = sl; found_uuid = u; @@ -7392,7 +7393,8 @@ static int resolve_copy_blocks_auto( if (found == 0) return log_error_errno(SYNTHETIC_ERRNO(ENXIO), - "Unable to automatically discover suitable partition to copy blocks from."); + "Unable to automatically discover suitable partition to copy blocks from for partition type %s.", + partition_designator_to_string(type.designator)); if (ret_devno) *ret_devno = found;