Changes to rtems_shell_script() working directory?

Peter Dufault dufault at hda.com
Sun Jun 28 11:20:08 UTC 2015


Does anyone know of changes in how the shell starts up that would affect the current working directory?  My 
"rc_file()" function no longer works, I see the output "shell: open input init.rc failed: No such file or directory” on the console.

Note that the rc_file() function verified the file existed with stat() before calling rtems_shell_script().

This is RTEMS 4.11 on the Phytec MPC5554 updated this AM and previously updated last September.  I can’t attach the debugger at the moment because this is at a remote site.

void rc_file(const char *name)
{
  struct stat st;
  if (stat(name, &st) == 0) {
    if (rtems_shell_script(
      "RUN_RC",
      rc_file.stacksize,
      rc_file.priority,
      name,
      "/dev/console",
      1,  /* Output append. */
      1,  /* Wait. */
      0   /* Echo. */
    )) {
      fprintf(stderr, "Error running \"%s\".\n", name);
    } 
  }
}         

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



More information about the users mailing list