On Tue, 2005-03-29 at 06:06 -0500, Gopu Bhaskar wrote: > > > 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. > yeah, i agree. but this was just a quick test thing i was trying............so overlooked it! -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/