Messages in this thread | | | From | "Peter T. Breuer" <> | Subject | Re: /proc/config patch update and a minor question | Date | Wed, 15 Mar 2000 14:17:32 +0100 (MET) |
| |
On removing lowercase letters in config options ... please, driver authors take note .. gratuitous lowercasery in config options considered dangerous.
"A month of sundays ago Riley Williams wrote:" > >>> ?? surely 64? 26+26+10+'_' just squeezes in. > > >> Do you need both uppercase and lowercase chars? > > > As far as I can tell, yes. > > > oboe:/usr/oboe/ptb% grep 'CONFIG_.*[a-z].*=' /usr/src/linux/.config > > CONFIG_SCSI_NCR53C7xx=m > > CONFIG_SCSI_NCR53C7xx_sync=y > > CONFIG_SCSI_NCR53C7xx_FAST=y > > CONFIG_SCSI_NCR53C7xx_DISCONNECT=y > > CONFIG_FONT_8x8=y > > CONFIG_FONT_8x16=y > > CONFIG_FONT_SUN8x16=y > > > Well, at least the letter 'x'! And 's' 'y' 'n' 'c'. > > Let me see if I can get rid of some of those...OK, dealt with, > patch enclosed. Perhaps you can propose this patch to whoever
Well done! But surely this has to go to many individuals? I am talking to Michael and Werner (who maintain the make structure, more or less) right now. But the drivers have to be modified. I'll copy to the kernel list to give the individuals a chance to notice.
> maintains the files in question... > > With that removed, these are all the options containing lower > case letters: > > Q> CONFIG_4xx > Q> CONFIG_6xx > Q> CONFIG_82xx > Q> CONFIG_8xx > Q> CONFIG_ARCNET_COM90xx > Q> CONFIG_ARCNET_COM90xxIO > Q> CONFIG_CPU_32v3 > Q> CONFIG_CPU_32v4 > Q> CONFIG_CS89x0 > Q> CONFIG_FONT_6x11 > Q> CONFIG_FONT_8x16 > Q> CONFIG_FONT_8x8 > Q> CONFIG_FONT_ACORN_8x8 > Q> CONFIG_FONT_PEARL_8x8 > Q> CONFIG_FONT_SUN12x22 > Q> CONFIG_FONT_SUN8x16 > Q> CONFIG_MAC89x0 > Q> CONFIG_MVME16x > Q> CONFIG_MVME16x_NET > Q> CONFIG_MVME16x_SCSI > Q> CONFIG_SCSI_NCR53C7xx > Q> CONFIG_SCSI_NCR53C7xx_DISCONNECT > Q> CONFIG_SCSI_NCR53C7xx_FAST > Q> CONFIG_SCSI_NCR53C7xx_SYNC > Q> CONFIG_WD80x3 > > You will note that the only lower case letters therein are 'v' > and 'x', which allows them to be two of the spare characters. > > One thing though: Are there any options where the VALUE needs > lower case letters?
It doesn't matter. Those are stored separately. There are very few different VALUEs, typically. 99% are "y" or "m". In fact I use an 8bit token to represent each VALUE internally and the distinct values are stored packed in an array. The token will usually be 1 ("y") or 2 ("m"). 8 bits is overkill. 4bits would usually be enough.
> >> 26 uppercase letters + 10 digits + space + 3 others = 40. > > > Forget space. > > What do you propose using as a padding byte when the string to be > encoded is not a multiple of three (or whatever) ?
Oh, one needs a terminator. I see. OK. Encode 0 or \n too!
> >> Simple: 40^3 = 64000 which is smaller than 65536 so fits in a > >> two byte word.
> I chose the character set on the basis of doing the equivalent > of... > > sed 's/^CONFIG_//' < .config | crunch > .config.b40 > > ...on compression, and... > > uncrunch < .config.b40 | sed 's/^/CONFIG_/' > > ...on decompression, hence the newline and space.
Peter
- 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/
| |