From 39f5404c5394802e107347e6014297c05951202a Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 16 Aug 2024 19:06:07 +0200 Subject: kernel/pcpy: minor cleanup, implement pcpy_from_str might potentially be used in a reworked open(), mount() etc interface --- src/kernel/proc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/kernel/proc.h') 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); -- cgit v1.2.3