summaryrefslogtreecommitdiff
path: root/Kernel/StdLib.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2020-01-11 10:27:37 +0100
committerAndreas Kling <awesomekling@gmail.com>2020-01-11 10:27:37 +0100
commitc97bfbd6097a26fa107d9393c094fe22d9110a79 (patch)
treeb270c8213141c1ef1346df406412620c3b69ede9 /Kernel/StdLib.h
parent6536a80aa9f679e3f0c87e828dcf68c784f4660b (diff)
downloadserenity-c97bfbd6097a26fa107d9393c094fe22d9110a79.zip
Kernel: Pass a parameter struct to mknod()
Diffstat (limited to 'Kernel/StdLib.h')
-rw-r--r--Kernel/StdLib.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/Kernel/StdLib.h b/Kernel/StdLib.h
index 937ddc1f0f..07b8684627 100644
--- a/Kernel/StdLib.h
+++ b/Kernel/StdLib.h
@@ -36,3 +36,15 @@ void* memmove(void* dest, const void* src, size_t n);
inline u16 ntohs(u16 w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
inline u16 htons(u16 w) { return (w & 0xff) << 8 | ((w >> 8) & 0xff); }
}
+
+template<typename T>
+inline void copy_from_user(T* dest, const T* src)
+{
+ copy_from_user(dest, src, sizeof(T));
+}
+
+template<typename T>
+inline void copy_to_user(T* dest, const T* src)
+{
+ copy_to_user(dest, src, sizeof(T));
+}