Subject: newvers.sh padding problem
To: None <tech-toolchain@netbsd.org, tech-kern@netbsd.org>
From: Curt Sampson <cjs@cynic.net>
List: tech-kern
Date: 01/31/1999 22:10:17
I tried to do a what(1) on my -current kernel today (i386) and
discovered that what no longer finds the version string. A quick
perusal of the file showed that, a la PR 1690, there's padding
(0x90) being inserted between sccs[] and version[]:

00257950  2e 33 49 00 20 20 20 20  40 28 23 29 90 90 90 90  |.3I.    @(#)....|
00257960  90 90 90 90 90 90 90 90  4e 65 74 42 53 44 20 31  |........NetBSD 1|
00257970  2e 33 49 20 28 43 59 4e  49 43 29 20 23 31 3a 20  |.3I (CYNIC) #1: |

This padding changes based on what's in vers.c; if I extend sccs[]
to 16 chars, or insert an 8 char array before sccs, it lines up
again.

1.3.3 doesn't have this padding:

001e02c0  00 20 20 20 20 40 28 23  29 4e 65 74 42 53 44 20  |.    @(#)NetBSD |
001e02d0  31 2e 33 2e 33 20 28 47  45 4e 45 52 49 43 29 20  |1.3.3 (GENERIC) |

I think we can probably more reliably fix this problem by changing
from an sccs array followed by a version array to a couple of
pointers into the same array, a la:

char sccs[] =     "@(#)NetBSD 1.3I (CYNIC) #1: Sun Jan 31 18:29:53 PST 1999\n    cjs@cynic.cynic.net:/usr2/netbsd/build/current/sys/CYNIC\n";
char *version = sccs+4;

I'll commit the change to make newvers.sh to do this if there are
no objections.

cjs
--
Curt Sampson  <cjs@cynic.net>   604 801 5335   De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: http://www.netbsd.org