write from kernel code example
Example 1: linux kernel write()
unsigned long copy_to_user(void *to, const void *from,
unsigned long count);
unsigned long copy_from_user(void *to, const void *from,
unsigned long count);
Example 2: linux kernel write()
ssize_t read(struct file *filp, char *buff,
size_t count, loff_t *offp);
ssize_t write(struct file *filp, const char *buff,
size_t count, loff_t *offp);