summaryrefslogtreecommitdiff
path: root/src/kernel/proc.h
diff options
context:
space:
mode:
authordzwdz2024-08-16 19:06:07 +0200
committerdzwdz2024-08-16 19:06:07 +0200
commit39f5404c5394802e107347e6014297c05951202a (patch)
tree085d8320ec2a93758168f1489485598da9cf19da /src/kernel/proc.h
parentf1bab6b74d84b972a9e817e5028b8e438bf5e83d (diff)
kernel/pcpy: minor cleanup, implement pcpy_from_str
might potentially be used in a reworked open(), mount() etc interface
Diffstat (limited to 'src/kernel/proc.h')
-rw-r--r--src/kernel/proc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/proc.h b/src/kernel/proc.h
index 0de740f..4ad6580 100644
--- a/src/kernel/proc.h
+++ b/src/kernel/proc.h
@@ -145,3 +145,7 @@ size_t pcpy_bi(
Proc *srcp, const __user void *src,
size_t len
);
+/* Copies a NUL-terminated string from the process.
+ * Returns the size of the string including the NUL terminator,
+ * and 0 on error or if the string didn't fit in dst. */
+size_t pcpy_from_str(Proc *p, char *dst, const __user char *src, size_t len);