- ubus_start_request(ctx, &req, b.head, UBUS_MSG_LOOKUP, 0);
- req.data_cb = receive_lookup;
- ret = ubus_complete_request(ctx, &req);
- if (ret)
- fprintf(stderr, "Failed: %d\n", ret);
+ ret = ubus_lookup(ctx, path, receive_lookup, NULL);
+ } else if (!strcmp(cmd, "call")) {
+ uint32_t id;
+
+ if (argc < 4 || argc > 5)
+ return usage(argv[0]);
+
+ ret = ubus_lookup_id(ctx, argv[2], &id);
+ if (!ret)
+ ret = ubus_invoke(ctx, id, argv[3], NULL, receive_data, NULL);