Date: Thu, 19 Nov 1998 13:55:25 +0000 (GMT) From: Mikhail Teterin <mi@aldan.algebra.com> To: current@FreeBSD.ORG Subject: strings in the kernel (was: snprintf() in the kernel) Message-ID: <199811191355.NAA03525@aldan.algebra.com> In-Reply-To: <199811190712.XAA23068@bubba.whistle.com> from Archie Cobbs at "Nov 18, 1998 11:12:24 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Archie Cobbs once stated: =In fact, the total byte count may even go down due to the several =instances in the code that are forced to do their own bounds checking =(the changes to subr_prf.c are minimal). This reminds me of a marginally related issue: strings /kernel | sort -u | wc 14409 22343 235606 vs. strings /kernel | wc 25522 34130 317264 In other words, there are 11113 duplicate lines in my kernel, amounting for a total of 91658 bytes. And this does not even include different strings with huge common sub-strings, such as: %s: unable to allocate hardware SCB array. Failing attach %s: unable to allocate targetcmd array. Failing attach or Data sync error - data auto-reallocated Data sync error - data rewritten Data sync error - recommend reassignment Data sync error - recommend rewrite It is very nice, that the kernel messages are getting easier to comprehend every day, and forced to choose, I would probably choose bloat over unreadabilty. But may be it is possible to have both? Like, say, a file with all/most of the strings defined in it (and their lengths, determined at compile time) and referenced from other files? AFAIK, there are even automated tools to do that. This will also be very helpfull to someone trying to translate all the messages to some other language in the future. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811191355.NAA03525>