Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!dayton!sjm From: sjm@dayton.UUCP (Steven J. McDowall) Newsgroups: comp.sources.d Subject: Re: Changing sysname and nodename dynamically. Message-ID: <223@dayton.UUCP> Date: Tue, 11-Nov-86 19:43:50 EST Article-I.D.: dayton.223 Posted: Tue Nov 11 19:43:50 1986 Date-Received: Wed, 12-Nov-86 00:54:26 EST References: <464@cdx39.UUCP> <1279@hoptoad.uucp> Reply-To: sjm@dayton.UUCP (Steven J. McDowall) Organization: Dayton-Hudson Dept. Store Co. Lines: 23 In article <1279@hoptoad.uucp> gnu@hoptoad.uucp (John Gilmore) writes: > ... >Writing to /dev/kmem is like using peek and poke in micro Basics. >You know it works, but you know damn well that this program will not >work on a different brand of computer. >-- If (yes, a big one here :-) the programmer did it at ALL half way carefully, then the code is almost garunteed to be portable at least in the same family of operating systems. (Ie. sys5 to sys5, I am not sure about BSD since I don't use it). SYS5 has a standard routine called nlist() (3C) which given a list of variable names, and a unix kernel, it will return the address offset in kmem where that variable is located. Now you can open kmem, seek to the correct position, and update. Not as bad as you would want us to believe, and VERY useful. -- Steven J. McDowall Dayton-Hudson Dept. Store. Co. UUCP: ihnp4!rosevax!dayton!sjm 700 on the Mall ATT: 1 612 375 2816 Mpls, Mn. 55408