Right.
> I have a version of resource.c that allows you to "walk" the holes, and
> for each hole you encounter the caller itself can determine whether a part
> of that hole would be acceptable. I'll make my pre-6 patch with this
> functionality available..
Linus, the way I'd do this is to pass a function argument to the "find
me a hole" function, that can do "postprocessing".
Like so:
find_resource (struct resource *root,
int start, int len, (int ()(int start, int len)))
^^^^^^^^^
forgive me. I always forget
the syntax of this.
A function "true" should be provided by the resource file (in case all
suggestions are acceptable).
I've been thinking about why I'd want it like this and not like how
you suggested it. The answer is that with your suggestion we'll end up
with the loop-code everywhere where we'd need this. With my suggestion
you'd just call "find_resource", check for error, and get on with
it. Your suggested code would require the caller to encapsulate it in
a loop...
Roger.
-- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 ** *-- BitWizard writes Linux device drivers for any device you may have! --* ------ Microsoft SELLS you Windows, Linux GIVES you the whole house ------
- 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/