Fix in the new code (suggested by Eric Norum).

This commit is contained in:
Ralph Lange
2006-09-20 14:10:03 +00:00
parent db3ba46ab0
commit e01a41c418

View File

@@ -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);