Re: do_mmap

Thomas 'Dent' Mirlacher (dent@cosy.sbg.ac.at)
Fri, 31 May 2002 20:21:10 +0200 (MET DST)


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/