From e01a41c418b332412b7eb9b0ef7ceb8737a8dbbd Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Wed, 20 Sep 2006 14:10:03 +0000 Subject: [PATCH] Fix in the new code (suggested by Eric Norum). --- src/RTEMS/base/rtems_init.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/RTEMS/base/rtems_init.c b/src/RTEMS/base/rtems_init.c index 97c8e9c9b..389678980 100644 --- a/src/RTEMS/base/rtems_init.c +++ b/src/RTEMS/base/rtems_init.c @@ -472,22 +472,13 @@ Init (rtems_task_argument ignored) rtems_bsdnet_initialize_network(); initialize_remote_filesystem(argv, initialize_local_filesystem(argv)); -#if 0 - if (rtems_bsdnet_config.hostname) { - char *cp = mustMalloc(strlen(rtems_bsdnet_config.hostname)+3, "iocsh prompt"); - sprintf(cp, "%s> ", rtems_bsdnet_config.hostname); - epicsEnvSet ("IOCSH_PS1", cp); - epicsEnvSet("IOC_NAME", rtems_bsdnet_config.hostname); - } - else { - epicsEnvSet ("IOCSH_PS1", "epics> "); - epicsEnvSet ("IOC_NAME", ":UnnamedIoc:"); - } -#endif + /* + * More environment: iocsh prompt and hostname + */ { - char *cp = mustMalloc(strlen(rtems_bsdnet_config.hostname)+3, "iocsh prompt"); char hostname[1024]; gethostname(hostname, 1023); + char *cp = mustMalloc(strlen(hostname)+3, "iocsh prompt"); sprintf(cp, "%s> ", hostname); epicsEnvSet ("IOCSH_PS1", cp); epicsEnvSet("IOC_NAME", hostname);