void rtems_filesystem_get_sym_start_loc(const char *path,
					int *index,
					rtems_filesystem_location_info_t *loc)
{
  if (rtems_filesystem_is_separator(path[0])) {
      *loc = rtems_filesystem_root;
      *index = 1;
    }
    else {
      *index = 0;
    }
}
Beispiel #2
0
int rtems_filesystem_dirname(
  const char  *pathname
)
{
  int len = strlen( pathname );

  while ( len ) {
    len--;
    if ( rtems_filesystem_is_separator( pathname[len] ) )
      break;
  }

  return len;
}
Beispiel #3
0
int rtems_filesystem_prefix_separators(
  const char  *pathname,
  int          pathnamelen
)
{
  /*
   * Eat any separators at start of the path.
   */
  int stripped = 0;
  while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
  {
    pathname++;
    pathnamelen--;
    stripped++;
  }
  return stripped;
}