[rtems commit] shell: Make rtems_global_shell_env public
Gedare Bloom
gedare at rtems.org
Thu May 29 00:41:10 UTC 2014
I'd prefer to post-pone til after the 4.11 release. Hiding the global
variable has apparently broken many user's expected way of using the
shell. That it happened as a side-effect of other shell improvements
made the 'break' not apparent. At least, if we do "revert" the revert,
an explanation and example should accompany the release notes.
-Gedare
On Wed, May 28, 2014 at 8:17 PM, Chris Johns <chrisj at rtems.org> wrote:
> Wooo this was a little fast. I do sleep. :)
>
> I would like my question answered on the user answered.
>
> I never liked the global in the first place and still do not.
>
> Chris
>
>
> On 29/05/2014 2:05 am, Sebastian Huber wrote:
>>
>> Module: rtems
>> Branch: master
>> Commit: 5f0ab5cfb5aa04cd08b06a43e8258253703e95ea
>> Changeset:
>> http://git.rtems.org/rtems/commit/?id=5f0ab5cfb5aa04cd08b06a43e8258253703e95ea
>>
>> Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
>> Date: Wed May 28 17:17:29 2014 +0200
>>
>> shell: Make rtems_global_shell_env public
>>
>> Provide rtems_global_shell_env as a public read-only variable for
>> backward compatibility.
>>
>> ---
>>
>> cpukit/libmisc/shell/shell.c | 2 +-
>> cpukit/libmisc/shell/shell.h | 2 ++
>> 2 files changed, 3 insertions(+), 1 deletions(-)
>>
>> diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
>> index 8666299..0f31f2a 100644
>> --- a/cpukit/libmisc/shell/shell.c
>> +++ b/cpukit/libmisc/shell/shell.c
>> @@ -40,7 +40,7 @@
>> #include <pthread.h>
>> #include <assert.h>
>>
>> -static rtems_shell_env_t rtems_global_shell_env = {
>> +const rtems_shell_env_t rtems_global_shell_env = {
>> .magic = rtems_build_name('S', 'E', 'N', 'V'),
>> .devname = CONSOLE_DEVICE_NAME,
>> .taskname = "SHGL",
>> diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
>> index af09ac3..76b34c7 100644
>> --- a/cpukit/libmisc/shell/shell.h
>> +++ b/cpukit/libmisc/shell/shell.h
>> @@ -205,6 +205,8 @@ bool rtems_shell_main_loop(
>> rtems_shell_env_t *rtems_shell_env
>> );
>>
>> +extern const rtems_shell_env_t rtems_global_shell_env;
>> +
>> rtems_shell_env_t *rtems_shell_get_current_env(void);
>> #define rtems_current_shell_env rtems_shell_get_current_env()
>>
>>
>> _______________________________________________
>> rtems-vc mailing list
>> rtems-vc at rtems.org
>> http://www.rtems.org/mailman/listinfo/rtems-vc
>>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
More information about the devel
mailing list