mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
sd-bus: Preserve interfaces addition order
When adding a new interface to the object add it at the end of the list. This way, when iterating over the list, e.g., during handling introspect call, the order of returned interfaces will mach the order in which they were added.
This commit is contained in:
committed by
Yu Watanabe
parent
2db991dc35
commit
998aa62a21
@@ -1973,6 +1973,9 @@ static int add_object_vtable_internal(
|
||||
}
|
||||
}
|
||||
|
||||
if (!existing)
|
||||
existing = LIST_FIND_TAIL(vtables, n->vtables);
|
||||
|
||||
s->node_vtable.node = n;
|
||||
LIST_INSERT_AFTER(vtables, n->vtables, existing, &s->node_vtable);
|
||||
bus->nodes_modified = true;
|
||||
|
||||
@@ -90,9 +90,9 @@ read -r x <"$FIFO_FILE"
|
||||
assert_eq "$x" "finished"
|
||||
|
||||
cmp -b <(systemctl show "$UNIT_NAME" -p Result -p NRestarts -p SubState) <<EOF
|
||||
SubState=dead
|
||||
Result=success
|
||||
NRestarts=1
|
||||
SubState=dead
|
||||
EOF
|
||||
|
||||
systemctl disable "$UNIT_NAME"
|
||||
|
||||
Reference in New Issue
Block a user