nuttx/fs/vfs
dongjiuzhu1 a2845faee3 fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits
test case:

int main(void)
{
  struct stat buf;
  int ret;

  stat("test1.t", &buf);
  printf("test1.t st.mode:%x\n", buf.st_mode);
  stat("test.t", &buf);
  printf("test.t st.mode:%x\n", buf.st_mode);
  ret = chmod("test1.t", buf.st_mode);
  if (ret == 0)
    {
      stat("test1.t", &buf);
      printf("test1.t st.mode:%x\n", buf.st_mode);
    }

  return 0;
}

>>
test1.t st.mode:81b4
test.t st.mode:81fd
test1.t st.mode:81fd

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-23 14:57:37 +08:00
..
CMakeLists.txt
fs_chstat.c fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits 2024-09-23 14:57:37 +08:00
fs_close.c fs:notify add support for inotify 2024-08-22 01:50:37 +08:00
fs_dir.c nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
fs_dup2.c fs_dup2:fix inode->i_crefs counting error 2024-09-19 02:55:13 +08:00
fs_dup.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_epoll.c nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
fs_eventfd.c nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
fs_fchstat.c fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits 2024-09-23 14:57:37 +08:00
fs_fcntl.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_fstat.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_fstatfs.c Fix vfs/fs_fstatfs.c:60:21: warning: variable 'inode' set but not used 2024-09-17 12:01:53 +08:00
fs_fsync.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_ioctl.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_link.c
fs_lock.c sched: use this_task replace nxsched_self 2024-09-05 09:33:50 -03:00
fs_lseek.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_mkdir.c fs:notify add support for inotify 2024-08-22 01:50:37 +08:00
fs_open.c BCH: Add readonly configuration for BCH devices 2024-09-19 03:53:20 +08:00
fs_poll.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_pread.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_pseudofile.c fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
fs_pwrite.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_read.c file_read: fix a bogus cast 2024-09-17 20:10:31 +08:00
fs_readlink.c
fs_rename.c fs/rename: Do not send notify if the same 2024-09-15 10:11:42 +08:00
fs_rmdir.c fs:notify add support for inotify 2024-08-22 01:50:37 +08:00
fs_select.c
fs_sendfile.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_signalfd.c nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
fs_stat.c
fs_statfs.c
fs_symlink.c fs:notify add support for inotify 2024-08-22 01:50:37 +08:00
fs_syncfs.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_timerfd.c nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
fs_truncate.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
fs_unlink.c fs:notify add support for inotify 2024-08-22 01:50:37 +08:00
fs_write.c vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
Kconfig
lock.h
Make.defs