> > const char msg[] = "hello"; > > > > 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); > > Here's your error, that should be count = strlen(msg); sizeif(msg) would give the size of the array msg. i.e. 6 Although the useage is not good, serves the purpose here. -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/