i have written a module. it will create a proc entry, in that proc entry i have mapped the below read function like.
unsigned char init_status=0xff; // Declared Globally inside module
int st_read(char *buf,char **start,off_t offset,int count,int *eof,void *data)
printk(KERN_ALERT "Read Called \n");
if(offset > 0)
*eof = 1;
now if i use cat to read the contents of that proc file then i m getting
i want to read the init_status variable as ff only. but i dont know why the st_read function called thrice and printing ffffff.
I m confused please help me in this regards