From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 13 03:03:10 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AB91A16A4CF for ; Thu, 13 Nov 2003 03:03:10 -0800 (PST) Received: from amsfep16-int.chello.nl (amsfep16-int.chello.nl [213.46.243.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CB9143FBF for ; Thu, 13 Nov 2003 03:03:04 -0800 (PST) (envelope-from Reinier@Kleipool.org) Received: from titan.kleipool.org ([213.93.137.166]) by amsfep16-int.chello.nlESMTP <20031113110302.SYIR1445.amsfep16-int.chello.nl@titan.kleipool.org> for ; Thu, 13 Nov 2003 12:03:02 +0100 Received: from io (io.ovs.kleipool.org [192.168.1.82]) by titan.kleipool.org (8.12.6/8.12.6) with SMTP id hADB30nk078837 for ; Thu, 13 Nov 2003 12:03:02 +0100 (CET) (envelope-from Reinier@Kleipool.org) From: "Reinier Kleipool" To: Date: Thu, 13 Nov 2003 12:02:59 +0100 Message-ID: <00bf01c3a9d5$b3bb9890$5201a8c0@ovs.kleipool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20031112153107.GB453@straylight.oblivion.bg> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4925.2800 Subject: RE: kernel enviroment in sysctl MIB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2003 11:03:10 -0000 Perter Pentechv wrote > Take a look at the kenv(1) utility - its source is in the > src/usr.bin/kenv/kenv.c file. Yes this does the job. But in a strange way... It starts at OID 0.3 (kern.environment) and appends small integers to it (0,1,2,3 etc). Why do it so strange.. Why are the variable names not just visible in sysctl. I know that the kern enviroment is not often used in normal operation, but would't it be nicer to just see the variables in the sysctl mib? I can incorporate this "trick" in my install program, but I could also try to patch kern_environment.c so the variables become visible. What do you think.... Kind regards, Reinier