From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 3 08:41:35 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FC475C2; Mon, 3 Nov 2014 08:41:35 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 72202DB5; Mon, 3 Nov 2014 08:41:34 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id n3so5752087wiv.6 for ; Mon, 03 Nov 2014 00:41:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=jf21Ev/FHb1aRnVYEMMrSJywI1m+4etC9uR4sO3h7C4=; b=lEU/BTZhlvJpM1uaWeTEWqfzXpWCGmOv4pUKUf2ribeo4ELsyQlDIukwNhxLbsbBKg 6ZdDVrvPukjiMoPFTNACSBQKyvZQCEyaEme48cW814rJo0+lk8QcmF7KlZYnfndV6OMg M7KT950HGu9nw7nckg1QDfkQNjb277MYgDLmrehtyPS+BrDe9BnEK6IJUPL39GrntPkc dTwiTa0U09IclxA82AZUPoR4/mi4ejo77ugNZm4PyV6bEegBGisDa3cV3Uc3cSMoOqmW YctmHrahB7rHF0SB0YJ3saS16F3g9E+XkYNiLD0RVK0ElmzeXwv8A07ZznwGcp74KNZF NmfQ== X-Received: by 10.194.63.145 with SMTP id g17mr47589832wjs.80.1415004092646; Mon, 03 Nov 2014 00:41:32 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id f6sm7926356wix.5.2014.11.03.00.41.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 03 Nov 2014 00:41:31 -0800 (PST) Date: Mon, 3 Nov 2014 09:41:29 +0100 From: Mateusz Guzik To: Julian Elischer Subject: Re: [PATCH] Finish the task 'sysctl reporting current working directory' Message-ID: <20141103084129.GF29497@dft-labs.eu> Mail-Followup-To: Mateusz Guzik , Julian Elischer , Tiwei Bie , freebsd-hackers@freebsd.org References: <1414987325-23280-1-git-send-email-btw@mail.ustc.edu.cn> <20141103051908.GC29497@dft-labs.eu> <20141103064052.GA1739@freebsd> <5457394E.4050905@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5457394E.4050905@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@freebsd.org, Tiwei Bie X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Nov 2014 08:41:35 -0000 On Mon, Nov 03, 2014 at 04:14:06PM +0800, Julian Elischer wrote: > On 11/3/14, 2:40 PM, Tiwei Bie wrote: > >On Mon, Nov 03, 2014 at 06:19:08AM +0100, Mateusz Guzik wrote: > >>On Mon, Nov 03, 2014 at 12:02:05PM +0800, Tiwei Bie wrote: > >> > >>>@@ -657,6 +657,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); > >>> #define KERN_PROC_UMASK 39 /* process umask */ > >>> #define KERN_PROC_OSREL 40 /* osreldate for process binary */ > >>> #define KERN_PROC_SIGTRAMP 41 /* signal trampoline location */ > >>>+#define KERN_PROC_CWD 42 /* process current working directory */ > >>> > why are you using a fixed sysctl MIB number? > I thought we were moving towards dynamic sysctls when we add new ones. > We are? KERN_PROC_* seems to be a complete list with SIGTRAMP added last year. I guess we can do it with OID_AUTO, if there will be any need we can switch it back to a static var. -- Mateusz Guzik