Re: alternate /proc/config.gz patch and a kfree question.

Peter T. Breuer (ptb@it.uc3m.es)
Sun, 31 May 1998 10:51:02 +0200 (MET DST)


"A month of sundays ago Nicholas J. Leon wrote:"
>
> On Sun, 31 May 1998, Andrew J. Anderson wrote:
> # my version of the patch so that the best of both methods may be merged
> # into something that may get accepted into the mainsteam kernel.
>
> About the only three things I can say are:
>
> * the more complicated something is, the more easily it breaks.

Agreed. I am VERY suspicious of complication. I see nothing wrong with
the patch you put up. It works for me (tm), it takes ~1KB memory and I
don't see the need for anything else. I was able to write it into 2.0.*
in two shakes of a lambs tail.

> * it was my understand that perl was a no-no for mainstream inclusion. Cuz
> if it isn't, I reduce my two pronged approach (1 .sh, 1.c) into a single
> perl script.

(no comment on perl, although I am NOT an advocate in any way ..). Your
C code seems to me to do nothing else than

od -v -tx1 -w10 | cut -d' ' -f 2-11 | ( echo "unsigned char ucTable[]= {"; \
sed -e 's/[^ ][^ ]*/ 0x&,/g' ; echo "};" )

You can get rid of parens for braces in that if you like. I'm not sure if
pure sh (not bash) will handle braces there. I would have used hexdump,
but my copy rejected every format I tried it on.

So please do either go all C or all script, but remove one.

> * the footprints of these two are greatly different. I show about a 1000
> byte increase in runtime size in my version. Much less than the other.

I calculate (not see!) about that also. Less, in fact.

> ..............................................................................
> ...nicholas j. leon..........mrnick.binary9.net.........nicholas@binary9.net..

Can the two authors get together to

1) simplify their code and remove features that may hide bugs
2) hide the switchoff functionality in ifdefs until it's certain it's right
3) ifdef CONFIG_PROC_CONFIG the whole thing.

?

Peter ptb@it.uc3m.es

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu