fs/romfs/fs_romfsutil.c
int romfs_hwconfigure(struct romfs_mountpt_s *rm)
{
  uint32_t total_size;

  if (!rm->rm_buffer)
    {
      return -ENOMEM;
    }


  total_size = romfs_devread32(rm, ROMFS_VHDR_SIZE);

  rm->rm_hwnsectors = total_size;
  rm->rm_hwsectorsize = 1;
  rm->rm_cachesector = (uint32_t)-1;
  rm->rm_volsize = total_size;

  return OK;
}
/****************************************************************************
 * Name: romfs_hwconfigure
 *
 * Description:
 *   This function is called as part of the ROMFS mount operation   It
 *   configures the ROMFS filestem for use on this block driver.  This includes
 *   the accounting for the geometry of the device, setting up any XIP modes
 *   of operation, and/or allocating any cache buffers.
 *
 ****************************************************************************/
romfs_hwconfigure
Description:
This function is called as part of the ROMFS mount operation   It
configures the ROMFS filestem for use on this block driver.  This includes
the accounting for the geometry of the device, setting up any XIP modes
of operation, and/or allocating any cache buffers.
romfs_hwconfigure Description : This function is called as part of the ROMFS mount operation It configures the ROMFS filestem for use on this block driver . This includes the accounting for the geometry of the device setting up any XIP modes of operation and / or allocating any cache buffers .
int romfs_hwconfigure(struct romfs_mountpt_s *rm)
{
  uint32_t total_size;
  if (!rm->rm_buffer)
    {
      return -ENOMEM;
    }
  total_size = romfs_devread32(rm, ROMFS_VHDR_SIZE);
  rm->rm_hwnsectors = total_size;
  rm->rm_hwsectorsize = 1;
  rm->rm_cachesector = (uint32_t)-1;
  rm->rm_volsize = total_size;
  return OK;
}
int romfs_hwconfigure ( struct romfs_mountpt_s * rm ) { uint32_t total_size ; if ( ! rm -> rm_buffer ) { return - ENOMEM ; } total_size = romfs_devread32 ( rm , ROMFS_VHDR_SIZE ) ; rm -> rm_hwnsectors = total_size ; rm -> rm_hwsectorsize = 1 ; rm -> rm_cachesector = ( uint32_t ) -1 ; rm -> rm_volsize = total_size ; return OK ; }
Name: romfs_hwconfigure
 Description:
   This function is called as part of the ROMFS mount operation   It
   configures the ROMFS filestem for use on this block driver.
Name : romfs_hwconfigure Description : This function is called as part of the ROMFS mount operation It configures the ROMFS filestem for use on this block driver .