(void) sd_notifyf(/* unset_environment= */ false, "BUSERROR=%s", error->name);
}
-static int list_bus_names(int argc, char **argv, void *userdata) {
+static int verb_list_bus_names(int argc, char **argv, void *userdata) {
_cleanup_strv_free_ char **acquired = NULL, **activatable = NULL;
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_hashmap_free_ Hashmap *names = NULL;
return r;
}
-static int tree(int argc, char **argv, void *userdata) {
+static int verb_tree(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
int r;
return 0;
}
-static int introspect(int argc, char **argv, void *userdata) {
+static int verb_introspect(int argc, char **argv, void *userdata) {
static const XMLIntrospectOps ops = {
.on_interface = on_interface,
.on_method = on_method,
return r;
}
-static int status(int argc, char **argv, void *userdata) {
+static int verb_status(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL;
pid_t pid;
return 0;
}
-static int call(int argc, char **argv, void *userdata) {
+static int verb_call(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL, *reply = NULL;
return bus_message_dump(reply, /* flags= */ 0);
}
-static int emit_signal(int argc, char **argv, void *userdata) {
+static int verb_emit_signal(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_fdset_free_ FDSet *passed_fdset = NULL;
return 0;
}
-static int get_property(int argc, char **argv, void *userdata) {
+static int verb_get_property(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
int r;
return 0;
}
-static int wait_signal(int argc, char **argv, void *userdata) {
+static int verb_wait_signal(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
_cleanup_(sd_event_source_unrefp) sd_event_source *timer = NULL;
return sd_event_loop(e);
}
-static int set_property(int argc, char **argv, void *userdata) {
+static int verb_set_property(int argc, char **argv, void *userdata) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
static int busctl_main(int argc, char *argv[]) {
static const Verb verbs[] = {
- { "list", VERB_ANY, 1, VERB_DEFAULT, list_bus_names },
- { "status", VERB_ANY, 2, 0, status },
- { "monitor", VERB_ANY, VERB_ANY, 0, verb_monitor },
- { "capture", VERB_ANY, VERB_ANY, 0, verb_capture },
- { "tree", VERB_ANY, VERB_ANY, 0, tree },
- { "introspect", 3, 4, 0, introspect },
- { "call", 5, VERB_ANY, 0, call },
- { "emit", 4, VERB_ANY, 0, emit_signal },
- { "wait", 4, 5, 0, wait_signal },
- { "get-property", 5, VERB_ANY, 0, get_property },
- { "set-property", 6, VERB_ANY, 0, set_property },
- { "help", VERB_ANY, VERB_ANY, 0, verb_help },
+ { "list", VERB_ANY, 1, VERB_DEFAULT, verb_list_bus_names },
+ { "status", VERB_ANY, 2, 0, verb_status },
+ { "monitor", VERB_ANY, VERB_ANY, 0, verb_monitor },
+ { "capture", VERB_ANY, VERB_ANY, 0, verb_capture },
+ { "tree", VERB_ANY, VERB_ANY, 0, verb_tree },
+ { "introspect", 3, 4, 0, verb_introspect },
+ { "call", 5, VERB_ANY, 0, verb_call },
+ { "emit", 4, VERB_ANY, 0, verb_emit_signal },
+ { "wait", 4, 5, 0, verb_wait_signal },
+ { "get-property", 5, VERB_ANY, 0, verb_get_property },
+ { "set-property", 6, VERB_ANY, 0, verb_set_property },
+ { "help", VERB_ANY, VERB_ANY, 0, verb_help },
{}
};