On 2/23/2024 6:19 PM, Gregory Nutt wrote:


On 2/23/2024 5:57 PM, Alan C. Assis wrote:
/tmp:
  test1
  test2
  test3
nsh> rm -r .
nsh: rm: unlink failed: 1
nsh> ls
/tmp:
nsh>

It reported error "unlink failed: 1", but removed all the files.

1 = EPERM, Operation not permitted

I suspect that occurred when it tried to rm ".".   Try putting a subdirectory under /tmp.  Does vfat even support the "." hardlink?

"." corresponds to the root directory of the mounted file system.  Trying to delete  "." will result in an EPERM error on VFAT.  See fat/fs_fat32dirent.c, function fat_remove().

It seems like there is some issue with unlink.

Reply via email to