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: 43cc7a3ef4

(cherry picked from commit 073965ab2f)
(cherry picked from commit 8c5b180f9f)
(cherry picked from commit 9b16a437f4)
This commit is contained in:
dongshengyuan authored and Luca Boccassi committed 2026-09-11 00:25:35 +01:00
1 parent b74b323e06
commit 7cbafb86cb
1 file changed
+1 -1
+1 -1
View File
@@ -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);