Commit Graph

1713 Commits

Author SHA1 Message Date
Jiuzhu Dong
978530f5f6 fs/ioctl: add BLKSSZGET cmd to get block sector size
refer to:
https://sites.uclouvain.be/SystInfo/usr/include/sys/mount.h.html

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
Jiuzhu Dong
b385c48a30 fs/fs_fsync: add file sync operation by ioctl
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-22 09:07:57 +03:00
ligd
cda9cfbc80 unlink: don't do unlink with inode_semtake
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 11:00:26 +08:00
ligd
1f854486c3 procfs: procfs_opendir should return fail if can't match
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-22 10:53:44 +08:00
Fotis Panagiotopoulos
66f49c1f3c mm: Fixed the usage of CONFIG_MM_BACKTRACE & CONFIG_DEBUG_MM. 2022-07-22 00:53:02 +08:00
Jukka Laitinen
b10658653b fs/partition/fs_gpt.c: Fix compilation error
PRI?OFF macros are defined in inttypes, so include it

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-07-19 23:50:30 +08:00
Xiang Xiao
2166c98809 Add printflike and scanflike to all printf/scanf like functions
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:14:36 +03:00
Xiang Xiao
3276438984 procfs/mount: Unify uint[32|64]_t to fsblkcnt_t for the code simplification
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-16 21:06:53 +03:00
Xiang Xiao
c211954a42 partition/gpt: Replace PRI?LBA with PRI?OFF
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-16 21:04:58 +03:00
Nathan Hartman
849f760b77 Fix various typos 2022-07-08 02:15:54 +08:00
SPRESENSE
fa1fad50b9 fs/fat: Fix a bug that long file name cannot be found
The field of first cluster under LFN directory entry must be 0x0000. If
it is set a value other than 0, it causes a problem where the long file
name entry cannot be found on a Windows PC and the short file name is
always used. In addition, correct the macro error in big endian.
2022-06-30 15:35:57 +08:00
Xiang Xiao
53c6789bef mm: Add mm_uninitialize to release the resource
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-12 19:41:14 +09:00
chao.an
2fa7ebc18f fs/mqueue: skip nxmq_pollnotify() if no poll waiters
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-06-10 18:40:42 +09:00
Xiang Xiao
3e32b605fe libc/tls: Make tls_get_info as the pulibc function instead up_tls_info
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 23:56:50 +03:00
vxj9800
bfde3c007d Add preprocessor directive __attribute__((packed)) to cromfs_node_s
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.
2022-06-01 12:09:37 +08:00
anjiahao
b88a8cf39f use rmutex inside of all repeated implementation
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-05-30 19:43:48 +08:00
Xiang Xiao
7ec6b4c7dd Change dpends on SCHED_[L|H]PWORK to SCHED_WORKQUEUE
since the code could map the unsupported work to the
supported one and remove select SCHED_WORKQUEUE from
Kconfig since SCHED_[L|H]PWORK already do the selection

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-28 18:41:51 +03:00
YAMAMOTO Takashi
b05320cac2 mm: Move backtrace stuff into a separate option
The functionality has too much overhead for CONFIG_DEBUG_MM.
2022-05-21 14:28:41 +08:00
YAMAMOTO Takashi
0a1ac4762a littlefs_stat: Fix directory size
lfs_info.size is only valid for LFS_TYPE_REG.
For directory, use 0 instead of stack garbage.
2022-05-20 15:37:28 +03:00
Xiang Xiao
22e4f1c59a sched: Remove start from nxsem_tickwait[_uninterruptible]
to simplify both caller and callee

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-15 13:55:58 +03:00
anjiahao
bc998f6072 fs:fs_getfilep changes fd judgment method
if a fd was closed,need return EBADF
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-04-19 22:48:39 +08:00
anjiahao
7ac2d3a5ac fs:oflag need consistent with psock
if don't consistent with psock,call fcntl will have differet flag
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-04-19 13:58:56 +03:00
Xiang Xiao
ef1a98dd00 Remove the unneeded void cast
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-17 23:32:05 +03:00
Petro Karashchenko
ebffcdc992 semaphore: fix usage of NXSEM_INITIALIZER
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-17 11:38:34 +08:00
Xiang Xiao
f14eed6432 vfs/fcntl: Minor style fix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-14 17:21:25 +03:00
liuhaitao
05cc6fb610 fs/fcntl: add O_APPEND flag judge in fcntl
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2022-04-14 17:21:25 +03:00
Jukka Laitinen
dbc163f1b0 fs/vfs/fs_truncate.c: Use ioctl to truncate on non-mountpoint inode
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-04-13 09:40:18 +08:00
YAMAMOTO Takashi
c9f3b3a7f1 littelfs: deal with block devices w/o ioctl
Note: Some block devices has ioctl == NULL. eg. drivers/loop
2022-04-11 13:38:26 +03:00
yinshengkai
4b6743591a fs/vfs: fix st_mode mask check
The full mask for st_mode is 0177777
Now modify any file permissions in hostfs and all will fail
2022-04-08 15:06:41 +03:00
Xiang Xiao
9785d6606c openamp: Change the dependence from OPENAMP to RPTUN
since all rpmsg driver need the extension api exposed by rptun driver

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-04-05 10:05:41 +03:00
Petro Karashchenko
d08fbca679 nuttx: unify FAR attribute usage across the code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-04 21:32:58 +08:00
Jiuzhu Dong
0a111b7c96 fs/rpmsgfs: fix bug about using uninit variable "times"
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 21:02:08 +08:00
ligd
6f210655fa rpmsgfs: do NOT access the pointer when do remote ioctl
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 17:39:38 +08:00
田昕
463a437733 fs and unistd: increase OPEN_MAX by claiming a Kconfig.
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-04-01 12:17:47 +03:00
Jiuzhu Dong
8a80a853b7 fs/romfs: fix string overflow when the length of rn_name exceeds NAME_MAX + 1
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 12:16:14 +03:00
Jiuzhu Dong
b5fb93aefb fs/procfstcbinfo: minor bug about print address
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 12:14:52 +03:00
Jiuzhu Dong
a91d143944 fs/unionfs: add sanity check for parameter
if relpath is NULL, it will cause system crash:
unionfs_opendir with relpath NULL
    ->	unionfs_tryopendir
	    ->	unionfs_offsetpath
		->  strncmp(prefix, relpath, pfxlen

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 16:35:43 +08:00
Jiuzhu Dong
e4c9a491c8 fs/unionfs: check return value to avoid unused value
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 16:35:43 +08:00
Jiuzhu Dong
4631face24 fs/unionfs: fix bug about use after free about ui
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-04-01 16:35:43 +08:00
ligd
40d9e10f37 rpmsgfs: use rptun_wait/post to resolve deadlock with usrsock
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 08:33:57 +03:00
ligd
96ed33f1d8 rpmsgfs: add timeout when mount in rpmsgfs
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 08:33:57 +03:00
ligd
023c54d0a4 rpmsgfs: add wait ready to rpmsgfs
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-04-01 08:33:57 +03:00
Jiuzhu Dong
ca8ce37433 fs/romfs: fix bug about compare path with same prefix
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-30 09:04:57 +03:00
ligd
b0e0f9db68 opendir: use inode_find() instead when opendir()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 03:33:39 +08:00
tianxin7
b53bbb15c5 fs:add _POSIX_OPEN_MAX limit to files_extend
Signed-off-by: 田昕 <tianxin7@xiaomi.com>
2022-03-29 17:51:20 +08:00
Xiang Xiao
37d7298f34 fs/littlefs: Convert the lfs_file_size error code to POSIX's
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-29 10:11:13 +08:00
Jiuzhu Dong
1146ff2f61 littlefs: unify lfs error code to nuttx
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-29 10:11:13 +08:00
Jiuzhu Dong
66d854371b fs/files_allocate: assert when fd overflow
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-29 00:19:13 +08:00
Jiuzhu Dong
b03f2e34b8 lseek: use type:off_t for return value
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-03-28 22:49:37 +08:00
Petro Karashchenko
98ba65c422 c89: get rid of designated initializers in common code
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-28 13:39:27 +08:00