mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
fs/cromfs: Block length only needs to be uint16_t, not uint32_t. Add pading to node structure to assue that alignment is the same on all platforms. tools/gencromfs.c: Fix the target offset of the '.' hard link.
This commit is contained in:
@@ -249,6 +249,8 @@ configuration:
|
||||
|
||||
Or the apps/examples/elf example if you like:
|
||||
|
||||
CONFIG_ELF=y
|
||||
# CONFIG_BINFMT_DISABLE is not set
|
||||
CONFIG_EXAMPLES_ELF=y
|
||||
CONFIG_EXAMPLES_ELF_CROMFS=y
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ struct cromfs_volume_s
|
||||
struct cromfs_node_s
|
||||
{
|
||||
uint16_t cn_mode; /* File type, attributes, and access mode bits */
|
||||
uint16_t cn_pad; /* Not used */
|
||||
uint32_t cn_name; /* Offset from the beginning of the volume header to the
|
||||
* node name string. NUL-terminated. */
|
||||
uint32_t cn_size; /* Size of the uncompressed data (in bytes) */
|
||||
|
||||
@@ -71,9 +71,9 @@
|
||||
struct cromfs_file_s
|
||||
{
|
||||
FAR const struct cromfs_node_s *ff_node; /* The open file node */
|
||||
uint32_t ff_offset; /* Cached offset (zero means none) */
|
||||
uint32_t ff_ulen; /* Length of uncompressed data in cache */
|
||||
FAR uint8_t *ff_buffer; /* Decompression buffer */
|
||||
uint32_t ff_offset; /* Cached block offset (zero means none) */
|
||||
uint16_t ff_ulen; /* Length of decompressed data in cache */
|
||||
FAR uint8_t *ff_buffer; /* Cached, decompressed data */
|
||||
};
|
||||
|
||||
/* This is the form of the callback from cromfs_foreach_node(): */
|
||||
|
||||
Reference in New Issue
Block a user