lkml.org 
[lkml]   [1998]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unresolved symbol open
Alan Cox wrote:
>
> > for (i; i <=3D count; i++) {
> > to =3D get_user(from);
> > to++;
> > from++;
> > }
>
> >
> > both pointer are unsiged char *. from represents the address in user
> > space, to in kernel space.
> > After the loop I dump the data I read for debuging with following:
> >
> > for(i=3D0; i<count; ){
> > printk("%i: %X %X %X %X\n", i, to[i], to[i+1], to[i+2], to[i+3]);
> > i +=3D 4;
> > }
> >
> > The data I stored in kernel space are not the one I wanted to get from
> > userspace, like I can seen in var/messages.
It was a fial of me. I called above function with a wrong pointer. Now
it runs.
Sorry for that.

>
> Shouldnt that be printk("%i: %X %X %X %X\n", i, (unsigned int)to[i]... ?
>
> I forget the promotion rules. For 2.0.x your code appears correct (2.1.x
> changed get_user's behaviour).

--

**********************************************************************
* Vasili Goutas RATIO Entwicklungen GmbH *
* P:+49-(0)40-369007-37 Admiralitätstr. 59 *
* F:+49-(0)40-369007-25 D-20459 Hamburg *
* Email: mailto:vgo@ratio.de *
**********************************************************************

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/faq.html

\
 
 \ /
  Last update: 2005-03-22 13:44    [W:0.020 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site