summaryrefslogtreecommitdiff
path: root/components/dfs/dfs_v2/filesystems/devfs/devfs.c
AgeCommit message (Collapse)Author
2025-01-09[components][dfs_v2]: Fix dfs_devfs_open memory leakwycwyhwyq
2024-11-13feat: devfs: handling unit size in POSIX RW requestShell
POSIX.1 says: > read() attempts to read up to count bytes from file descriptor fd > into the buffer starting at buf. On the other hand, for rt_device_read, the `@size` is defined as the number of unit (block size for blk device, otherwise one byte). Changes: - Transferred unit size from POSIX R/W(in bytes) to rt_device_R/W during request of file R/W operations. Signed-off-by: Shell <[email protected]>
2024-09-15fixup: dfs_v2: Correct device mode permissions in devfsShell
The mode permissions for character, block, and pipe devices were previously set to 0777, which is overly permissive and not in line with standard practice. This change reduces the permissions to 0666, restricting execute permissions while still allowing read/write access. Changes: - Adjusted permissions for character/block/pipe devices from 0777 to 0666. Signed-off-by: Shell <[email protected]>
2024-08-24fix_return_errzhujiale
2024-05-21[dfsv2] fixup out-of-memory access (#8973)Shell
This change addresses a potential out-of-memory access issue in the devfs filesystem component. The issue arises when the `rt_malloc` function allocates memory for a path string without accounting for the null terminator, leading to undefined behavior. As the manual documented: > DESCRIPTION > The strlen() function calculates the length of the string pointed to > by s, excluding the terminating null byte ('\0'). To fix this, the memory allocation size was increased by one byte to ensure space for the null terminator. This prevents potential out-of-memory access and ensures proper string termination. Signed-off-by: Shell <[email protected]>
2024-04-25[components][dfs]remove duplicate lseek in devfs (#8859)zms123456
remove duplicate lseek in devfs
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-03-25fixup d1s (#8671)Shell
Signed-off-by: Shell <[email protected]>
2023-12-12sync update dfs v2. (#8336)geniusgogo
2023-08-02update dfs (#7887)geniusgogo
2023-07-24modify some function prototypes of the dfs_file_ops structure and the ↵xiao-mang
function declarations based on it (#7849)
2023-06-10[dfs] Add DFS v2.0 (#7606)Bernard Xiong
2023-04-08[DFS] prepare for dfs_v2.0 (#7200)Bernard Xiong
* [DFS] prepare for dfs_v2. dfs_fd -> dfs_file; dfs_fnode -> dfs_vnode. * [BSP] fix code analysis warning * [smart] fix the pointer overflow. * code format * [smart] fix the lwp->lwp_obj checking.
2023-04-04[DFS] add Kconfig for dfs-v2.0 (#7156)Bernard Xiong
* [DFS] add Kconfig for dfs-v2.0 * [DFS] Optimize the SConscript. * [dfs] move old dfs to dfs/dfs_v1