Root/m1/patches/rtems/export-shell-fns.patch

Source at commit b6b61b1 created 2 years 2 months ago.
By Xiangfu, m1/patches/rtems: refresh
1commit 27f66fa6a8ea83283b05dcdfa4d70c9048adf448
2Author: Sebastien Bourdeauducq <sebastien@milkymist.org>
3Date: Fri Feb 24 21:58:20 2012 +0100
4
5    Export rtems_shell_init_env, rtems_shell_env_free, rtems_shell_main_mv, rtems_shell_main_cp and rtems_shell_main_rm
6
7Index: rtems/cpukit/libmisc/shell/main_mv.c
8===================================================================
9--- rtems.orig/cpukit/libmisc/shell/main_mv.c 2012-05-14 12:34:47.271490000 +0800
10+++ rtems/cpukit/libmisc/shell/main_mv.c 2012-05-14 12:35:14.309964001 +0800
11@@ -116,7 +116,7 @@
12 const char *user_from_uid(uid_t uid, int nouser);
13 char *group_from_gid(gid_t gid, int nogroup);
14 
15-static int
16+int
17 rtems_shell_main_mv(int argc, char *argv[])
18 {
19   rtems_shell_mv_globals mv_globals;
20Index: rtems/cpukit/libmisc/shell/shell.c
21===================================================================
22--- rtems.orig/cpukit/libmisc/shell/shell.c 2012-05-14 12:34:47.287482000 +0800
23+++ rtems/cpukit/libmisc/shell/shell.c 2012-05-14 12:35:14.313962001 +0800
24@@ -59,7 +59,7 @@
25 /*
26  * Initialize the shell user/process environment information
27  */
28-static rtems_shell_env_t *rtems_shell_init_env(
29+rtems_shell_env_t *rtems_shell_init_env(
30   rtems_shell_env_t *shell_env_p
31 )
32 {
33@@ -81,7 +81,7 @@
34 /*
35  * Completely free a shell_env_t and all associated memory
36  */
37-static void rtems_shell_env_free(
38+void rtems_shell_env_free(
39   void *ptr
40 )
41 {
42Index: rtems/cpukit/libmisc/shell/shell.h
43===================================================================
44--- rtems.orig/cpukit/libmisc/shell/shell.h 2012-05-14 12:34:47.259496001 +0800
45+++ rtems/cpukit/libmisc/shell/shell.h 2012-05-14 12:35:14.317960001 +0800
46@@ -205,6 +205,13 @@
47   rtems_shell_env_t *rtems_shell_env
48 );
49 
50+rtems_shell_env_t *rtems_shell_init_env(
51+ rtems_shell_env_t *shell_env_p
52+);
53+void rtems_shell_env_free(
54+ void *ptr
55+);
56+
57 extern rtems_shell_env_t rtems_global_shell_env;
58 extern rtems_shell_env_t *rtems_current_shell_env;
59 
60@@ -305,6 +312,13 @@
61 
62 extern int rtems_shell_main_monitor(int argc, char **argv);
63 
64+/*
65+ * Provide these commands for application use, as their implementation
66+ * is tedious.
67+ */
68+int rtems_shell_main_mv(int argc, char *argv[]);
69+int rtems_shell_main_cp(int argc, char *argv[]);
70+int rtems_shell_main_rm(int argc, char *argv[]);
71 
72 #ifdef __cplusplus
73 }
74

Archive Download this file

Branches:
master



interactive