May 27, 2014
12:48 p.m.
Hi! Goal, when the user do : # head -1 /dev/miscdrv The driver prints: Hello World! Steps: # Make # insmod misc.ko # head -1 /dev/miscdrv Why my driver doesn't work ? What is worg with my read operation? static ssize_t misc_drv_read(struct file *filp, char __user * buf, size_t count, loff_t * offp){ int nbytes; char * string = "hello World"; nbytes = copy_to_user(buf, string, 12); return nbytes; } -- Lucas Tanure Brazil