|
Greetings,
I am
trying to write a *very* simple character device driver (straight out of a book)
and am getting an error that I cannot fix and do not understand. Any help
is appreciated.
The
pertinent details:
Mandrake 7.2
in the
driver:
static
char * Message_Ptr;
static
char Message_buf[100];
static
ssize_t device_read ( struct file * file, char * buffer, size_t length, loff_t *
offset )
{
<snip>
while
( length && * Message_Ptr )
{
put_user( *(Message_Ptr),
buffer);
Message_Ptr++;
buffer++;
length--;
}
the
problem is that the module won't load with a report of :
unresolved symbol __put_user_X
which
implies that the size of the target (ptr) is neither 1, 2, nor 4 bytes
(!?)
however, using copy_to_user works very
well.
what
am I missing?
If I
try to force it (via hacking the macro) to use put_user_1 it returns
garbage. Help?
Regards,
Rick Zemer, [EMAIL PROTECTED] [ PGP encouraged/key available ] (317) 587-3453 / fax: (317) 587-6779 "Like so many Americans, she was trying to construct a life that made sense from things she found in gift shops." -- Kurt Vonnegut |
