RTEMS shell and telnetd

Peter Dufault dufault at hda.com
Thu May 29 07:07:29 UTC 2014


On May 29, 2014, at 01:13 , Chris Johns <chrisj at rtems.org> wrote:

>>> since so many user stumble over this problem I think we should bring
>>> this global rtems_global_shell_env back as a read-only variable simply
>>> to initialize rtems_shell_env_t variables.
>>> 
>> 
>> What is wrong with:
>> 
>>   rtems_shell_env_t shell_env = *rtems_shell_get_current_env();
>> 
>> ?
>> 
> 
> This does not work because this call was checking for NULL and 
> asserting. I have posted a patch that removes the check and also add a 
> rtems_shell_dup_current_env call. I have tested ..
> 
>    rtems_shell_env_t shell_env;
> 
>    rtems_shell_dup_current_env(&shell_env);
>    shell_env.taskname = NULL;
>     ...etc...
> 
> works with telnetd.

When I looked through this yesterday I wasn't thinking I was working in a shell context (since I was creating a shell), but of course that callback function would be.  That's fine.

Peter
-----------------
Peter Dufault
HD Associates, Inc.      Software and System Engineering





More information about the users mailing list