]> rtime.felk.cvut.cz Git - rtems-devel.git/commitdiff
appdl: rename original dlopen shell command to dlrun to not collide with shell functi...
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 25 Sep 2016 12:59:05 +0000 (14:59 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 25 Sep 2016 12:59:05 +0000 (14:59 +0200)
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
rtems-omk-template/appdl/init.c

index 465b31453ff4373230422f4c666a22c7e58586ed..55e3e377843a373ad8e2737efac4f201da9cd108 100644 (file)
@@ -24,6 +24,7 @@
 #include <rtems/error.h>
 #include <rtems/monitor.h>
 #include <rtems/shell.h>
+#include <rtems/rtl/dlfcn-shell.h>
 
 #define USE_RTEMS_TARFS_LOAD
 
@@ -115,7 +116,9 @@ int testcmd_forshell(int argc, char **argv)
 
 typedef int (*call_t)(int argc, char* argv[]);
 
-int dlopen_forshell(int argc, char **argv)
+volatile int continue_execution;
+
+int dlrun_forshell(int argc, char **argv)
 {
   void * handle;
   int    unresolved;
@@ -224,9 +227,25 @@ rtems_task Init(
                 "test command for shell",
                 testcmd_forshell);
 
-  rtems_shell_add_cmd("dlopen", "app",
-                "runtime load object and call contained function",
-                dlopen_forshell);
+  rtems_shell_add_cmd("dlrun", "rtl",
+                "runtime load object and run specified function",
+                dlrun_forshell);
+
+  rtems_shell_add_cmd("dlopen", "rtl",
+                "runtime load object",
+                shell_dlopen);
+
+  rtems_shell_add_cmd("dlclose", "rtl",
+                "close reference to loaded object",
+                shell_dlclose);
+
+  rtems_shell_add_cmd("dlsym", "rtl",
+                "obtain reference to symbol in loaded object",
+                shell_dlsym);
+
+  rtems_shell_add_cmd("dlcall", "rtl",
+                "call function in loaded object",
+                shell_dlcall);
 
   //rtems_monitor_wakeup();