[libc-commits] [PATCH] D133922: [libc] Add the implementation of the "remove" function.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Sep 15 06:59:44 PDT 2022


lntue added inline comments.


================
Comment at: libc/src/stdio/linux/remove.cpp:23
+  // it fails with EISDIR, we will try unlinking it as a directory.
+  int ret = __llvm_libc::syscall(SYS_unlinkat, AT_FDCWD, path, 0);
+  if (ret == -EISDIR)
----------------
In the implementation of `linux/unlinkat`, `SYS_unlinkat` is guarded: https://github.com/llvm/llvm-project/blob/main/libc/src/unistd/linux/unlinkat.cpp#L21
Do you need the same guard here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133922/new/

https://reviews.llvm.org/D133922



More information about the libc-commits mailing list