since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This directive tells the compiler that cromfs_node_s might be located at a memory
address which is not word aligned. This resolves the hardFault caused by unaligned
memory access on armv6-m architecture which doesn't support it.
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
This will resolve numerous problems with the way that hard links, in particular "." and ".." are handled. Instead of trying to fudge the stat flags, the correct implementation is to follow the hard link to the final link target node. That is what must determine the attributes of the directory entry.
Squashed commit of the following:
Correct some additional compile-related issues.
Move include/nuttx/binfmt/builtin.h to include/nuttx/lib/builtin.h. Move apps/builtin/lib_builtin_forindex.c to libs/libc/builtin/lib_builtin_forindex.c.
Move binfmt/libbuiltin to libs/libc/builtin. There are calls made directly from apps/nshlib into this logic and hence, must be part of a library that can be shared between the OS and applications.
Squashed commit of the following:
tools/gencromfs.c: Seems basically functional but has not has not yet been integrated with CROMFS.
tools/gencromfs.c: Revist previous commit. Let's make no assumptions about the compatibility of the host system and NuttX.
tools/gencromfs.c: I think access mode bits are sufficiently standard that we can just copy them from the host. This is don't mostly to pick up the executable bits and other conbinations of bits without doing a bit-for-bit decode.
tools/gencromfs.c: Code complete but only partially functional.
tools/gencromfs.c: type definitions must precede data definitions
tools/gencromfs.c: Adds a little more logic to gencromfs tools. Still not complete but can traverse directories and generate directory and hard-link nodes.
tools/gencromfs.c: Beginning of a genromfs tool that will eventually be used for generation of CROMFS file system images.
Squashed commit of the following:
fs/cromfs: Now depends on EXPERIMENTAL because it is not yet verified.
fs/cromfs: This commit brings the CROMFS file system to code complete. Still completely untested. Next steps: Need a tool to generate CROMFS file system images and a test case under apps/
fs/cromfs: Add logic to traverse the in-memory file system nodes.
fs/cromfs: Add initial support for an in-memory, compressed, read-only file system.