debugfs question ...

rdq at metamail.co rdq at metamail.co
Wed May 1 08:06:58 EDT 2019


> my guess is your are not returning EOF (= 0). User space expects a return
> value of 0 (EOF) to terminate reading. But your code will always return
> sizeof("Hello world\n"). A fix would be to not only increment ppos, but also
> check if it's already behind your data.
> 
> Regards,
> 
> Martin

Thank you, Martin, help much appreciated. It's a bit of a mystery but neither works for me. More detail in my reply to Greg KH.





More information about the Kernelnewbies mailing list