* [9fans] diff to get a /dev/config file
@ 2002-06-14 9:46 Fco.J.Ballesteros
0 siblings, 0 replies; only message in thread
From: Fco.J.Ballesteros @ 2002-06-14 9:46 UTC (permalink / raw)
To: 9fans
For those like me who just don't remember what was in the config file
used to build the kernel, this adds /dev/config (#c/config).
/dev/config holds a copy of the config file used to build the kernel.
If you are interested, instructions follow.
At /sys/src/9/port/portmkfile, replace the $CONF.c rule with this one:
$CONF.c: ../port/mkdevc $CONF
rc ../port/mkdevc $CONF > $CONF.c
{echo 'uchar configfile[]={'
xd -1x $CONF |
sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
echo 0,
echo '};'} >> $CONF.c
Then apply this change:
diff devcons.c /sys/src/9/port/devcons.c
500a501
> Qconfig,
530a532
> "config", {Qconfig}, 0, 0444,
653a656
> extern char configfile[];
758c761,762
<
---
> case Qconfig:
> return readstr((ulong)offset, buf, n, configfile);
If you applied it, you may also like to apply this to /sys/man/3/cons:
diff cons /sys/man/3/cons
28a29
> .B /dev/config
146a148,151
> .PP
> The
> .B config
> file contains a copy of the kernel configuration file used to build the kernel.
enjoy
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-06-14 9:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-14 9:46 [9fans] diff to get a /dev/config file Fco.J.Ballesteros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).