diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-01-23 12:36:55 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-01-23 23:38:20 +0100 |
commit | 27cf4c18c76d8024d2857609a296567509ba9e1a (patch) | |
tree | f6fa527db766f72eaa484b1303309970c3893a78 /src/libsystemd/sd-bus/bus-dump.c | |
parent | c7d26acce6dcb0e72be6160873fac758e9b7c440 (diff) | |
download | systemd-27cf4c18c76d8024d2857609a296567509ba9e1a.tar.gz |
sd-bus: make dump flags public
Diffstat (limited to 'src/libsystemd/sd-bus/bus-dump.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-dump.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c index 9a6a81d7aa..398ca7162c 100644 --- a/src/libsystemd/sd-bus/bus-dump.c +++ b/src/libsystemd/sd-bus/bus-dump.c @@ -18,23 +18,23 @@ #include "terminal-util.h" #include "util.h" -static char *indent(unsigned level, unsigned flags) { +static char *indent(unsigned level, uint64_t flags) { char *p; unsigned n, i = 0; n = 0; - if (flags & BUS_MESSAGE_DUMP_SUBTREE_ONLY && level > 0) + if (flags & SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY && level > 0) level -= 1; - if (flags & BUS_MESSAGE_DUMP_WITH_HEADER) + if (flags & SD_BUS_MESSAGE_DUMP_WITH_HEADER) n += 2; p = new(char, n + level*8 + 1); if (!p) return NULL; - if (flags & BUS_MESSAGE_DUMP_WITH_HEADER) { + if (flags & SD_BUS_MESSAGE_DUMP_WITH_HEADER) { p[i++] = ' '; p[i++] = ' '; } @@ -45,7 +45,7 @@ static char *indent(unsigned level, unsigned flags) { return p; } -int bus_message_dump(sd_bus_message *m, FILE *f, unsigned flags) { +int bus_message_dump(sd_bus_message *m, FILE *f, uint64_t flags) { unsigned level = 1; int r; @@ -54,7 +54,7 @@ int bus_message_dump(sd_bus_message *m, FILE *f, unsigned flags) { if (!f) f = stdout; - if (flags & BUS_MESSAGE_DUMP_WITH_HEADER) { + if (flags & SD_BUS_MESSAGE_DUMP_WITH_HEADER) { fprintf(f, "%s%s%s Type=%s%s%s Endian=%c Flags=%u Version=%u Priority=%"PRIi64, m->header->type == SD_BUS_MESSAGE_METHOD_ERROR ? ansi_highlight_red() : @@ -118,11 +118,11 @@ int bus_message_dump(sd_bus_message *m, FILE *f, unsigned flags) { bus_creds_dump(&m->creds, f, true); } - r = sd_bus_message_rewind(m, !(flags & BUS_MESSAGE_DUMP_SUBTREE_ONLY)); + r = sd_bus_message_rewind(m, !(flags & SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY)); if (r < 0) return log_error_errno(r, "Failed to rewind: %m"); - if (!(flags & BUS_MESSAGE_DUMP_SUBTREE_ONLY)) { + if (!(flags & SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY)) { _cleanup_free_ char *prefix = NULL; prefix = indent(0, flags); @@ -259,7 +259,7 @@ int bus_message_dump(sd_bus_message *m, FILE *f, unsigned flags) { } } - if (!(flags & BUS_MESSAGE_DUMP_SUBTREE_ONLY)) { + if (!(flags & SD_BUS_MESSAGE_DUMP_SUBTREE_ONLY)) { _cleanup_free_ char *prefix = NULL; prefix = indent(0, flags); |