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
This commit is contained in:
dongshengyuan
2026-08-06 10:06:00 +08:00
parent 09f8b59ac3
commit 073965ab2f
+1 -1
View File
@@ -471,7 +471,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);