Lines Matching refs:p
54 static void push_plugin(struct plugin *p) in push_plugin() argument
56 p->next = plugin_list_head; in push_plugin()
57 plugin_list_head = p; in push_plugin()
62 struct plugin *p = plugin_list_head; in find_plugin() local
64 while (p) { in find_plugin()
65 if (!uuid_cmp(&p->method->uuid, u)) in find_plugin()
66 return p; in find_plugin()
68 p = p->next; in find_plugin()
74 static enum plugin_err load_plugin(const char *name, struct plugin *p) in load_plugin() argument
83 p->handle = handle; in load_plugin()
89 p->method = m; in load_plugin()
98 struct plugin *p = NULL; in plugin_invoke() local
100 p = find_plugin(u); in plugin_invoke()
101 if (!p) in plugin_invoke()
104 assert(p->method->invoke); in plugin_invoke()
106 return p->method->invoke(cmd, sub_cmd, data, in_len, out_len); in plugin_invoke()
125 struct plugin *p; in plugin_load_all() local
130 p = calloc(1, sizeof(struct plugin)); in plugin_load_all()
131 if (!p) { in plugin_load_all()
138 res = load_plugin((const char *)entry->d_name, p); in plugin_load_all()
143 free(p); in plugin_load_all()
148 free(p); in plugin_load_all()
152 p->method->name); in plugin_load_all()
157 if (p->method->init) { in plugin_load_all()
158 teec_res = p->method->init(); in plugin_load_all()
161 p->method->name, teec_res); in plugin_load_all()
162 free(p); in plugin_load_all()
167 push_plugin(p); in plugin_load_all()