From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <68ac7861c2bdc06ed75c9de0e5eef755@plan9.escet.urjc.es> To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] diff to get a /dev/config file Date: Fri, 14 Jun 2002 11:46:10 +0200 Topicbox-Message-UUID: ad18b174-eaca-11e9-9e20-41e7f4b1d025 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