ROMFS: Back out 29028bcd5a
. A cool idea, but loses the EXECUTABLE bit in the file type.
This commit is contained in:
parent
40f8e8b41f
commit
d677e63008
@ -256,6 +256,7 @@ static int romfs_open(FAR struct file *filep, FAR const char *relpath,
|
||||
*/
|
||||
|
||||
rf->rf_size = dirinfo.rd_size;
|
||||
rf->rf_type = (uint8_t)(dirinfo.rd_next & RFNEXT_ALLMODEMASK);
|
||||
|
||||
/* Get the start of the file data */
|
||||
|
||||
@ -737,7 +738,7 @@ static int romfs_fstat(FAR const struct file *filep, FAR struct stat *buf)
|
||||
{
|
||||
/* Return information about the directory entry */
|
||||
|
||||
ret = romfs_stat_common(RFNEXT_FILE, rf->rf_size,
|
||||
ret = romfs_stat_common(rf->rf_type, rf->rf_size,
|
||||
rm->rm_hwsectorsize, buf);
|
||||
}
|
||||
|
||||
|
@ -158,11 +158,12 @@ struct romfs_mountpt_s
|
||||
|
||||
struct romfs_file_s
|
||||
{
|
||||
struct romfs_file_s *rf_next; /* Retained in a singly linked list */
|
||||
FAR struct romfs_file_s *rf_next; /* Retained in a singly linked list */
|
||||
uint32_t rf_startoffset; /* Offset to the start of the file data */
|
||||
uint32_t rf_size; /* Size of the file in bytes */
|
||||
uint32_t rf_cachesector; /* Current sector in the rf_buffer */
|
||||
uint8_t *rf_buffer; /* File sector buffer, allocated if rm_xipbase==0 */
|
||||
uint8_t rf_type; /* File type (for fstat()) */
|
||||
};
|
||||
|
||||
/* This structure is used internally for describing the result of
|
||||
|
Loading…
Reference in New Issue
Block a user