|
|
@@ -42,10 +42,10 @@
|
|
|
#include <vcc/pretty.h>
|
|
|
|
|
|
|
|
|
-extern struct plugin plg_hello;
|
|
|
+extern struct plugin plg_hello, plg_robot;
|
|
|
|
|
|
struct plugin *plugins[] = {
|
|
|
- &plg_hello,
|
|
|
+ &plg_hello, &plg_robot,
|
|
|
(struct plugin *) NULL
|
|
|
};
|
|
|
|
|
|
@@ -72,6 +72,13 @@ struct plugin *find_plg(char *s) {
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+int plg_insert(struct plugin *plg) {
|
|
|
+ plg->state = PLG_INSERTED;
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
int do_cmd_pins(char *s) {
|
|
|
struct plugin *p;
|
|
|
char name[MSG_SIZE];
|
|
|
@@ -87,8 +94,7 @@ int do_cmd_pins(char *s) {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
- p->state = PLG_INSERTED;
|
|
|
- return 0;
|
|
|
+ return plg_insert(p);
|
|
|
}
|
|
|
|
|
|
|