summaryrefslogtreecommitdiff
path: root/src/sys/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-10-10 19:41:53 -0400
committerIan Moffett <ian@osmora.org>2025-10-10 19:42:39 -0400
commit2c5df0dfeaf878f0f09485b7a80c79aea36d194e (patch)
tree32e911fc2096805e396a2412e6143b2a47c24e58 /src/sys/include
parent2f8da5a5eb726f3c05b8fca19e82928d8acb147d (diff)
kern: systm: Add copyoutstr()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/include')
-rw-r--r--src/sys/include/os/systm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sys/include/os/systm.h b/src/sys/include/os/systm.h
index 24f21db..4cb526e 100644
--- a/src/sys/include/os/systm.h
+++ b/src/sys/include/os/systm.h
@@ -68,4 +68,16 @@ int copyin(const void *uaddr, void *kaddr, size_t len);
*/
int copyout(const void *kaddr, void *uaddr, size_t len);
+/*
+ * Copy kernel string to userland safely
+ *
+ * @kaddr: Kernel space address to copy from
+ * @uaddr: User space address to copy to
+ * @len: Length of bytes to copy
+ *
+ * Returns zero on success, otherwise a less than
+ * zero value.
+ */
+int copyoutstr(const void *kaddr, void *addr, size_t len);
+
#endif /* !_OS_SYSTM_H_ */