Changeset cc060f0 in rtems


Ignore:
Timestamp:
May 10, 2019, 12:38:28 PM (7 weeks ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
327ae9ac
Parents:
b446457
git-author:
Sebastian Huber <sebastian.huber@…> (05/10/19 12:38:28)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/14/19 09:11:51)
Message:

shell: Avoid rtems_error()

Do not use the rtems_error() function since this function pulls in
exit() and abort(). The abort() function pulls in raise() which pulls
in the whole POSIX signals support. This change saves about 16KiB of
text/rodata on ARM Thumb-2 systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/shell/shell.c

    rb446457 rcc060f0  
    2121
    2222#include <rtems.h>
    23 #include <rtems/error.h>
    2423#include <rtems/libio.h>
    2524#include <rtems/libio_.h>
     
    690689  sc = rtems_libio_set_private_env();
    691690  if (sc != RTEMS_SUCCESSFUL) {
    692     rtems_error(sc, "rtems_libio_set_private_env():");
    693691    return false;
    694692  }
     
    731729  shell_env = rtems_shell_init_env(shell_env_arg);
    732730  if (shell_env == NULL) {
    733     rtems_error(0, "rtems_shell_init_env");
    734731    return false;
    735732  }
     
    737734  eno = pthread_setspecific(rtems_shell_current_env_key, shell_env);
    738735  if (eno != 0) {
    739     rtems_error(0, "pthread_setspecific(shell_current_env_key)");
    740736    return false;
    741737  }
    742738
    743739  if (!rtems_shell_init_user_env()) {
    744     rtems_error(0, "rtems_shell_init_user_env");
    745740    return false;
    746741  }
     
    998993  );
    999994  if (sc != RTEMS_SUCCESSFUL) {
    1000     rtems_error(sc,"creating task %s in shell_init()",task_name);
    1001995    return sc;
    1002996  }
     
    1004998  shell_env = rtems_shell_init_env( NULL );
    1005999  if ( !shell_env )  {
    1006    rtems_error(RTEMS_NO_MEMORY,
    1007                "allocating shell_env %s in shell_init()",task_name);
    10081000   return RTEMS_NO_MEMORY;
    10091001  }
     
    10261018                          (rtems_task_argument) shell_env);
    10271019  if (sc != RTEMS_SUCCESSFUL) {
    1028     rtems_error(sc,"starting task %s in shell_init()",task_name);
    10291020    return sc;
    10301021  }
Note: See TracChangeset for help on using the changeset viewer.