mirror of
https://github.com/systemd/systemd.git
synced 2026-11-07 22:07:14 +00:00
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 commit073965ab2f) (cherry picked from commit8c5b180f9f) (cherry picked from commit9b16a437f4)
This commit is contained in:
1 parent
b74b323e06
commit
7cbafb86cb
1 file changed
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user