2008-04-11 05:05:08     driver write function being called with count == 0

Document created by Aaronwu Employee on Aug 6, 2013
Version 1Show Document
  • View in full screen mode

2008-04-11 05:05:08     driver write function being called with count == 0

John Zalfer (UNITED STATES)

Message: 54085    I'm writing a very basic character device.  When I write a byte equaling 1 to the device node associated with my driver, the write function (with an interface like below) gets triggered.  My 1 is in buf, however count == 0.  How is this possible? <pre class="code c"> <pre class="code c">static ssize_t scmd_write(struct file *filep,

const char *buf, size_t count,

loff_t * f_pos)

QuoteReplyEditDelete

 

 

2008-04-11 12:32:03     Re: driver write function being called with count == 0

Mike Frysinger (UNITED STATES)

Message: 54101    are you calling write() with 0 byte len ?

QuoteReplyEditDelete

 

 

2008-04-11 16:15:25     Re: driver write function being called with count == 0

John Zalfer (UNITED STATES)

Message: 54118    That was my problem.  Thanks.

Attachments

    Outcomes