EmbLogic's Blog

How to Write a Writer Routine.

In the char driver We write the Write Routine.  This write routine is mapped in struct file operations . We use copy_from_user macro. this macro has three arguments. first is void* to second is const  void* __user form and last argument is how many char  have to write.

first malloc the sqset then malloc sqset->data and at last create qsetarray. Then malloc qsetarry member one by one and write the data by using copy_from_user macro.

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>