lkml.org 
[lkml]   [2002]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: do_mmap
Dick,

--snip/snip


> > btw, is err should (according to alans explaination be):
> >
> > return (unsigned long)ptr > (unsigned long)-1024UL;
> >
> > tm
> >
>
> At the user-mode API, we get to (void *) -1, defined in sys/mman.h
> (actually (__ptr_t) -1); so whatever you do, the 'C' runtime library
> has to 'know' about your return values if this propagates to
> sys-calls.

the code right now, will pass all the errors through to the user
space in any case (beside a handful internal kernel-functions).

by changing unsigned long to void * everything should stay the same
(at least for todays architectures) - well if i'm wrong, please
enlighten me :)

also using IS_ERR is essentially the same as the other approaches
to check for errors (beside the check for == 0).

this means by "cleaning up" the internal functions, _nothing_ should
me impacted, even if the changes are step by step, function by function,
beside some gcc warnings (the well known: "assignment makes pointer from
integer without a cast").

cheers,

tm

--
in some way i do, and in some way i don't.

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

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