aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/file.h
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2024-12-26 11:44:15 +0100
committerEgor Tensin <egor@tensin.name>2024-12-26 11:44:15 +0100
commitb4df6f859a2c0804069a7c2fe26656d982828b1a (patch)
treed66be4321a52f609d04df1eb3ef27db541b172b3 /src/file.h
parentMakefile: remove obsolete comment (diff)
downloadcimple-b4df6f859a2c0804069a7c2fe26656d982828b1a.tar.gz
cimple-b4df6f859a2c0804069a7c2fe26656d982828b1a.zip
file: rename syscall wrappers
Diffstat (limited to 'src/file.h')
-rw-r--r--src/file.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/file.h b/src/file.h
index 54bb5fb..9c228a4 100644
--- a/src/file.h
+++ b/src/file.h
@@ -12,8 +12,12 @@
int rm_rf(const char *dir);
-int my_chdir(const char *dir, char **old);
-char *my_readlink(const char *path);
+/* This chdir(2) wrapper optionally saves the previous working directory in the
+ * `old` pointer, allowing the user to switch back to it if necessary. */
+int chdir_wrapper(const char *dir, char **old);
+
+/* This readlink(2) wrapper allocates enough memory dynamically. */
+char *readlink_wrapper(const char *path);
int file_dup(int fd);
void file_close(int fd);