fs/romfs/fs_romfsutil.c
int romfs_fsconfigure(struct romfs_mountpt_s *rm)
{
  const char *name;
  uint32_t    ndx;

  /* Then get information about the ROMFS filesystem on the devices managed
   * by this block driver.  Read sector zero which contains the volume header.
   */

  ndx = romfs_devcacheread(rm, 0);
  if (ndx < 0)
    {
      return ndx;
    }

  /* Verify the magic number at that identifies this as a ROMFS filesystem */

  if (memcmp(rm->rm_buffer, ROMFS_VHDR_MAGIC, 8) != 0)
    {
      return -EINVAL;
    }

  /* The root directory entry begins right after the header */

  name              = (const char *)&rm->rm_buffer[ROMFS_VHDR_VOLNAME];
  rm->rm_rootoffset = ROMFS_ALIGNUP(ROMFS_VHDR_VOLNAME + strlen(name) + 1);

  /* and return success */

  rm->rm_mounted    = true;
  return OK;
}
/****************************************************************************
 * Name: romfs_fsconfigure
 *
 * Description:
 *   This function is called as part of the ROMFS mount operation   It
 *   sets up the mount structure to include configuration information contained
 *   in the ROMFS header.  This is the place where we actually determine if
 *   the media contains a ROMFS filesystem.
 *
 ****************************************************************************/
romfs_fsconfigure
Description:
This function is called as part of the ROMFS mount operation   It
sets up the mount structure to include configuration information contained
in the ROMFS header.  This is the place where we actually determine if
the media contains a ROMFS filesystem.
romfs_fsconfigure Description : This function is called as part of the ROMFS mount operation It sets up the mount structure to include configuration information contained in the ROMFS header . This is the place where we actually determine if the media contains a ROMFS filesystem .
int romfs_fsconfigure(struct romfs_mountpt_s *rm)
{
  const char *name;
  uint32_t    ndx;
  ndx = romfs_devcacheread(rm, 0);
  if (ndx < 0)
    {
      return ndx;
    }
  if (memcmp(rm->rm_buffer, ROMFS_VHDR_MAGIC, 8) != 0)
    {
      return -EINVAL;
    }
  name              = (const char *)&rm->rm_buffer[ROMFS_VHDR_VOLNAME];
  rm->rm_rootoffset = ROMFS_ALIGNUP(ROMFS_VHDR_VOLNAME + strlen(name) + 1);
  rm->rm_mounted    = true;
  return OK;
}
int romfs_fsconfigure ( struct romfs_mountpt_s * rm ) { const char * name ; uint32_t ndx ; ndx = romfs_devcacheread ( rm , 0 ) ; if ( ndx < 0 ) { return ndx ; } if ( memcmp ( rm -> rm_buffer , ROMFS_VHDR_MAGIC , 8 ) != 0 ) { return - EINVAL ; } name = ( const char * ) & rm -> rm_buffer [ ROMFS_VHDR_VOLNAME ] ; rm -> rm_rootoffset = ROMFS_ALIGNUP ( ROMFS_VHDR_VOLNAME + strlen ( name ) + 1 ) ; rm -> rm_mounted = true ; return OK ; }
Name: romfs_fsconfigure
 Description:
   This function is called as part of the ROMFS mount operation   It
   sets up the mount structure to include configuration information contained
   in the ROMFS header.
Name : romfs_fsconfigure Description : This function is called as part of the ROMFS mount operation It sets up the mount structure to include configuration information contained in the ROMFS header .
/* Then get information about the ROMFS filesystem on the devices managed
   * by this block driver.  Read sector zero which contains the volume header.
   */ /* Verify the magic number at that identifies this as a ROMFS filesystem */ /* The root directory entry begins right after the header */ /* and return success */