> static ssize_t Device_read(struct file *filp,char *buf,size_t > count,loff_t *offset) > { > if (*offset >= sizeof(msg) ) > { > return 0; > } > > count = sizeof(msg); > > if(copy_to_user(buf, msg, count)) > return -EFAULT; > > *offset += count; > return count; > } > Well.. i had similar program some time back, which worked fine. I guess the problem is with the --first call-- to the read function where you are assuming that the value will be >= message size. Try printing out there itself what is the value of "offset" is! -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/