1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

manager: add list of subscribers to dump info

This is handy for debugging.

(cherry picked from commit 91713841491d0d4775566ed59f621f0f9a2413b5)
(cherry picked from commit bcf740e4a3caa32b3a920512833b68fc6d530125)
(cherry picked from commit 0a4a3a8e3f8c2daedabba8ac0d785da55263467b)
(cherry picked from commit cc110c0ce6)
(cherry picked from commit 01ba55b882)
This commit is contained in:
Ronan Pigott 2024-11-28 12:52:45 -07:00 committed by Luca Boccassi
parent 7bdec4c526
commit 9e788905b8

View File

@ -59,6 +59,9 @@ static void manager_dump_header(Manager *m, FILE *f, const char *prefix) {
timestamp_is_set(t->realtime) ? FORMAT_TIMESTAMP(t->realtime) :
FORMAT_TIMESPAN(t->monotonic, 1));
}
for (const char *n = sd_bus_track_first(m->subscribed); n; n = sd_bus_track_next(m->subscribed))
fprintf(f, "%sSubscribed: %s\n", strempty(prefix), n);
}
void manager_dump(Manager *m, FILE *f, char **patterns, const char *prefix) {