From 7cbafb86cbdb01d2299bc99eacfdb7b65f95484f Mon Sep 17 00:00:00 2001 From: dongshengyuan <545258830@qq.com> Date: Wed, 5 Aug 2026 12:16:38 +0800 Subject: [PATCH] sysupdate: parse PartitionFlags= as hexadecimal sysupdate.d(5) documents PartitionFlags= as a hexadecimal integer, and sysupdate patterns format partition flags with PRIx64. The parser used safe_atou64(), which rejected values such as abcdef. Reproducer: set PartitionFlags=abcdef in a partition target transfer and run systemd-sysupdate list with debug logging. Before: sysupdate logged: Failed to parse partition flags, ignoring: abcdef After: the transfer parses cleanly and list emits no partition-flags parse warning. Follow-up for: 43cc7a3ef4f6a89946e7ffd6a3112a0c1740b1ef (cherry picked from commit 073965ab2f1785ac7b37988a94ffd34b5ac738e6) (cherry picked from commit 8c5b180f9f36dfdb5546be832164d798a9e33cfe) (cherry picked from commit 9b16a437f44c3a3ab5ef09b84bcc49c7a601c1fb) --- src/sysupdate/sysupdate-transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysupdate/sysupdate-transfer.c b/src/sysupdate/sysupdate-transfer.c index 797cb05798e..9fa7975a87e 100644 --- a/src/sysupdate/sysupdate-transfer.c +++ b/src/sysupdate/sysupdate-transfer.c @@ -462,7 +462,7 @@ static int config_parse_partition_flags( assert(rvalue); - r = safe_atou64(rvalue, &t->partition_flags); + r = safe_atoux64(rvalue, &t->partition_flags); if (r < 0) { log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse partition flags, ignoring: %s", rvalue);