summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r--src/libsystemd/sd-bus/busctl.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 6aaaf0e5ec..1724292bbb 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -656,28 +656,15 @@ static int member_compare_func(const void *a, const void *b) {
assert(x->type);
assert(y->type);
- if (!x->interface && y->interface)
- return -1;
- if (x->interface && !y->interface)
- return 1;
- if (x->interface && y->interface) {
- d = strcmp(x->interface, y->interface);
- if (d != 0)
- return d;
- }
+ d = strcmp_ptr(x->interface, y->interface);
+ if (d != 0)
+ return d;
d = strcmp(x->type, y->type);
if (d != 0)
return d;
- if (!x->name && y->name)
- return -1;
- if (x->name && !y->name)
- return 1;
- if (x->name && y->name)
- return strcmp(x->name, y->name);
-
- return 0;
+ return strcmp_ptr(x->name, y->name);
}
static int member_compare_funcp(const void *a, const void *b) {
@@ -1697,6 +1684,7 @@ static int help(void) {
" --acquired Only show acquired names\n"
" --activatable Only show activatable names\n"
" --match=MATCH Only show matching messages\n"
+ " --size=SIZE Maximum length of captured packet\n"
" --list Don't show tree, but simple object path list\n"
" --quiet Don't show method call reply\n"
" --verbose Show result values in long format\n"
@@ -1837,7 +1825,7 @@ static int parse_argv(int argc, char *argv[]) {
case ARG_SIZE: {
off_t o;
- r = parse_size(optarg, 0, &o);
+ r = parse_size(optarg, 1024, &o);
if (r < 0) {
log_error("Failed to parse size: %s", optarg);
return r;