Simple Misc Driver - Problem with string copy to user

Lucas Tanure tanure at linux.com
Tue May 27 09:09:30 EDT 2014


Wow, many thanks.
So the read operation should return the total number of bytes, not a
true/false int.

I need to read more about this operations.

Thanks

--
Lucas Tanure
+55 (19) 988176559


On Tue, May 27, 2014 at 10:05 AM, Bjørn Mork <bjorn at mork.no> wrote:

> Lucas Tanure <tanure at linux.com> writes:
>
> > So, My misc_drv_read returns 0, and it's ok. So why the command head
> didn't
> > get the string ?
>
> You told it that it got a string with length 0.  And that's what it
> printed.
>
>
> Bjørn
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140527/2ebf48ed/attachment.html 


More information about the Kernelnewbies mailing list