Skip to content

Commit e62d3ac

Browse files
committed
Rename path_unlink_directory to path_remove_directory.
1 parent 4e9b107 commit e62d3ac

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

libc-bottom-half/cloudlibc/src/libc/unistd/__wasilibc_rmdirat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
int __wasilibc_rmdirat(int fd, const char *path) {
77
size_t path_len = strlen(path);
8-
__wasi_errno_t error = __wasi_path_unlink_directory(fd, path, path_len);
8+
__wasi_errno_t error = __wasi_path_remove_directory(fd, path, path_len);
99
if (error != 0) {
1010
errno = errno_fixup_directory(fd, error);
1111
return -1;

libc-bottom-half/headers/public/wasi/core.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ typedef uint64_t __wasi_rights_t;
211211
#define __WASI_RIGHT_FD_FILESTAT_SET_SIZE (UINT64_C(0x0000000000400000))
212212
#define __WASI_RIGHT_FD_FILESTAT_SET_TIMES (UINT64_C(0x0000000000800000))
213213
#define __WASI_RIGHT_PATH_SYMLINK (UINT64_C(0x0000000001000000))
214-
#define __WASI_RIGHT_PATH_UNLINK_DIRECTORY (UINT64_C(0x0000000002000000))
214+
#define __WASI_RIGHT_PATH_REMOVE_DIRECTORY (UINT64_C(0x0000000002000000))
215215
#define __WASI_RIGHT_PATH_UNLINK_FILE (UINT64_C(0x0000000004000000))
216216
#define __WASI_RIGHT_POLL_FD_READWRITE (UINT64_C(0x0000000008000000))
217217
#define __WASI_RIGHT_SOCK_SHUTDOWN (UINT64_C(0x0000000010000000))
@@ -628,11 +628,11 @@ __wasi_errno_t __wasi_path_unlink_file(
628628
size_t path_len
629629
) __WASI_SYSCALL_NAME(path_unlink_file) __attribute__((__warn_unused_result__));
630630

631-
__wasi_errno_t __wasi_path_unlink_directory(
631+
__wasi_errno_t __wasi_path_remove_directory(
632632
__wasi_fd_t fd,
633633
const char *path,
634634
size_t path_len
635-
) __WASI_SYSCALL_NAME(path_unlink_directory) __attribute__((__warn_unused_result__));
635+
) __WASI_SYSCALL_NAME(path_remove_directory) __attribute__((__warn_unused_result__));
636636

637637
__wasi_errno_t __wasi_poll_oneoff(
638638
const __wasi_subscription_t *in,

libc-bottom-half/libpreopen/lib/po_libc_wrappers.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ unlink(const char *pathname)
358358
int
359359
rmdir(const char *pathname)
360360
{
361-
struct po_relpath rel_pathname = find_relative(pathname, __WASI_RIGHT_PATH_UNLINK_DIRECTORY, 0);
361+
struct po_relpath rel_pathname = find_relative(pathname, __WASI_RIGHT_PATH_REMOVE_DIRECTORY, 0);
362362

363363
return __wasilibc_rmdirat(rel_pathname.dirfd, rel_pathname.relative_path);
364364
}
@@ -368,15 +368,15 @@ remove(const char *pathname)
368368
{
369369
struct po_relpath rel_pathname = find_relative(pathname,
370370
__WASI_RIGHT_PATH_UNLINK_FILE |
371-
__WASI_RIGHT_PATH_UNLINK_DIRECTORY,
371+
__WASI_RIGHT_PATH_REMOVE_DIRECTORY,
372372
0);
373373

374374
// If searching for both file and directory rights failed, try searching
375375
// for either individually.
376376
if (rel_pathname.dirfd == -1) {
377377
rel_pathname = find_relative(pathname, __WASI_RIGHT_PATH_UNLINK_FILE, 0);
378378
if (rel_pathname.dirfd == -1) {
379-
rel_pathname = find_relative(pathname, __WASI_RIGHT_PATH_UNLINK_DIRECTORY, 0);
379+
rel_pathname = find_relative(pathname, __WASI_RIGHT_PATH_REMOVE_DIRECTORY, 0);
380380
}
381381
}
382382

0 commit comments

Comments
 (0)