lkml.org 
[lkml]   [1999]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] copy_strings cleanup for 2.3.2


On Sun, 16 May 1999, Andi Kleen wrote:
>
> This patch cleans up copy_strings considerably:

If something like this needs to be done (and the patches look reasonably
ok), then I'd much rather clean it up all the way.

So a real cleanup would do in addition to your changes:
- copystrings would return the error value, instead of writing it to a
pointer. I hate those kinds of interfaces (look at the extremes I went
to in order to avoid it for get_user(), for example).
- instead of passing in 5 arguments, just pass in the bprm pointer. That
way you get rid of the arguments that are always the same (bprm->page
and bprm->p), and you don't have to return bprm->p because copy_strings
can just modify it in place. (which allows you to do #1 above)

So copy_strings would be something like

int copy_strings(int argc, char *const*argv, &bprm)

instead of

unsigned long copy_strings(.. horror-arguments ..)

no?

Would you mind going that exra mile?

Linus


-
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/

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