incubator-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 vfs/file: add reference counting to prevent accidental close during reading writing... 2024-09-17 12:01:53 +08:00
binfs nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
cromfs nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
driver nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
fat nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
hostfs fs/hostfs: Replace strcpy with memcpy 2024-09-06 12:27:55 +08:00
inode fs_inode:Change the type of i_crefs to atomic_int 2024-09-23 14:07:03 +08:00
littlefs add sched note for littlefs/romfs/rpmsgfs 2024-09-17 15:21:54 -03:00
mmap greenhills: fix the enumerated type mixed using warning 2024-09-19 14:08:07 +08:00
mnemofs boards/sim: Defconfigs for nand and mnemofs 2024-09-05 11:02:05 +08:00
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 fs: nfs: Fix nfsmount error 2024-08-27 21:57:18 +08:00
notify nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
nxffs nuttx: resolve various 'FAR' and 'CODE' issues 2024-08-26 10:21:03 +08:00
partition fs: partition: fs_mbr: fix for MBR block count calculation. 2024-01-14 01:29:24 -08:00
procfs Thermal: Add procfs file nodes 2024-09-23 08:57:29 +08:00
romfs add sched note for littlefs/romfs/rpmsgfs 2024-09-17 15:21:54 -03:00
rpmsgfs add sched note for littlefs/romfs/rpmsgfs 2024-09-17 15:21:54 -03:00
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 smartfs procfs: fix double declare g_smartfs_operations 2024-09-10 11:32:32 +08:00
socket nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang 2024-09-23 14:07:03 +08:00
spiffs nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
tmpfs fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap 2024-08-25 22:12:37 +08:00
unionfs nuttx: fix multiple 'FAR', 'CODE' and style issues 2024-08-25 19:22:15 +08:00
userfs fs: procfs add poll support 2023-12-26 19:23:13 -08:00
v9fs Fix Kconfig style 2024-09-17 22:16:41 +08:00
vfs fs/chmod/fchmod/lchmod: only set permissions by mode_t and ignore other bits 2024-09-23 14:57:37 +08:00
zipfs fs: procfs add poll support 2023-12-26 19:23:13 -08:00
CMakeLists.txt fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap 2024-08-25 22:12:37 +08:00
Kconfig Add reference count configuration 2024-09-17 12:01:53 +08:00
Makefile Revert "build depend:Revert Make.dep intermediate ddc file" 2024-09-15 19:29:47 +08:00
fs_heap.c fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap 2024-08-25 22:12:37 +08:00
fs_heap.h fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap 2024-08-25 22:12:37 +08:00
fs_initialize.c fs: add fs_heap, support shm/tmpfs/pseudofile with indepent heap 2024-08-25 22:12:37 +08:00