nuttx/fs
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
..
aio
binfs
cromfs
driver
fat
hostfs
inode fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
littlefs
mmap
mnemofs
mount fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
mqueue fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
nfs
notify nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
nxffs
partition
procfs Thermal: Add procfs file nodes 2024-09-23 08:57:29 +08:00
romfs
rpmsgfs
semaphore fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
shm fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
smartfs
socket nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
spiffs
tmpfs
unionfs
userfs
v9fs
vfs fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits 2024-09-23 14:57:37 +08:00
zipfs
CMakeLists.txt
fs_heap.c
fs_heap.h
fs_initialize.c
Kconfig
Makefile