RTEMS TFTP driver now handles leading ../ path name components properly.

Thus, for ../../dbd/example.dbd to be found properly, the st.cmd script
must be moved down two directories.  For now it is in bin/scripts, but
that may change.
This commit is contained in:
W. Eric Norum
2001-09-29 19:51:24 +00:00
parent 993f3423ee
commit c7f8051c84
+2 -2
View File
@@ -103,7 +103,7 @@ rtems_set_directory (void)
l = strlen (path);
if (gethostname (&path[l], pathsize - l - 2) || (path[l] == '\0'))
LogFatal ("Can't get host name");
strcat (path, "/");
strcat (path, "/bin/scripts/");
if (chdir (path) < 0)
LogFatal ("Can't set initial TFTP directory");
}
@@ -228,8 +228,8 @@ Init (rtems_task_argument ignored)
* Run the EPICS startup script
*/
printf ("***** Executing EPICS startup script *****\n");
rtems_set_directory ();
iocshRegisterRTEMS ();
rtems_set_directory ();
iocsh ("st.cmd");
/*