utils: add copy_struct_to_client()

parent aa659ba5
......@@ -261,4 +261,12 @@ static inline int copy_struct_from_client(__u32 server_size, void *dst,
return 0;
}
static inline __u32 copy_struct_to_client(__u32 client_size, void *dst,
__u32 server_size, const void *src)
{
__u32 size = min(server_size, client_size);
memcpy(dst, src, size);
return size;
}
#endif /* __LXC_UTILS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment