origoffset represent the offset of current node
offset represent the offset of the file when
the current node is a soft or hard link
Signed-off-by: guohao15 <guohao15@xiaomi.com>
The man manual describes that poll only has EFAULT, EINTR, EINVAL, and ENOMEM return values.
If a file returns an error, the POLLERR event should be set and OK should be returned
https://man7.org/linux/man-pages/man2/poll.2.html
When using libuv to poll the socket, the socket poll returned an EBUSY error, causing libuv to abort.
The expected logic should be to return OK, allowing libuv to notify the event listener that the POLLERR event occurred.
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
timeout is a type of int
in MSEC2TICK, timeout may be multiplied by USEC_PER_MSEC
and the result may be out of range of int
Besides, this will induce following ERROR while running simulator:
vfs/fs_poll.c:498:38: runtime error: signed integer overflow:
19768268 * 1000 cannot be represented in type 'int'
Signed-off-by: zhengyu9 <zhengyu9@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
v9fs/virtio_9p.c:223:3: error: too few arguments to function 'virtio_negotiate_features'
223 | virtio_negotiate_features(vdev, 1 << VIRTIO_9P_MOUNT_TAG);
v9fs/virtio_9p.c:245:9: error: too few arguments to function 'virtio_create_virtqueues'
245 | ret = virtio_create_virtqueues(vdev, 0, 1, vqname, callback);
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
In ./fs/inode directory, the variable name FAR struct inode *node is named inconsistently, with some using node and others using inode. To facilitate understanding, we will standardize the naming to FAR struct inode *inode.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This extension for the event group, to establish a connection between
named event groups and a task. The task may reference the event group
associated with a VFS-based name. Then the event group can be used
in subsequent calls to nxevent_wait() or nxevent_post().
This is an internal OS interface and should not be used by applications.
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
/home/neo/projects/vela/nuttx/fs/vfs/fs_dup2.c: In function 'file_dup3':
/home/neo/projects/vela/nuttx/fs/inode/inode.h:73:35: error: implicit declaration of function '_SCHED_GETTID' [-Werror=implicit-function-declaration]
73 | int n = sched_backtrace(_SCHED_GETTID(), \
| ^~~~~~~~~~~~~
/home/neo/projects/vela/nuttx/fs/vfs/fs_dup2.c:177:3: note: in expansion of macro 'FS_ADD_BACKTRACE'
177 | FS_ADD_BACKTRACE(filep2);
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Summary:
When the device reboot through reboot_notify to notify the task fsync time, if there is a task in the exit process, there may be priority robbed off the phenomenon, and at this time the group->tg_filelist crefs has been 0, resulting in the ASSERT
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
Summary:
Reference https://man7.org/linux/man-pages/man2/open.2.html
EISDIR pathname refers to a directory and the access requested
involved writing (that is, O_WRONLY or O_RDWR is set).
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>