2009-04-06 03:03:47 Kernal returning -1 always for any negative values
ThangarJ P (INDIA)
I am working with BF533-EZkit and uClinux distribution 2008R1.5.
i have written one character driver in the kernal.
if we call any API from the user space(read,write or ioctl) then we are returning some values to user from kernal space.
But we are receiving always -1in the user space if we returning any negative value excluding -1from kernal space .
could you please clarify why this happening?
2009-04-06 03:46:29 Re: Kernal returning -1 always for any negative values
Mike Frysinger (UNITED STATES)
that isnt how char drivers (or any driver for that matter) works. the return value of the function never represents data passed to the user.
please read a book about writing linux device drivers:
some there are completely free (like LDD3).