From owner-freebsd-arch@FreeBSD.ORG Fri Aug 22 10:24:58 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5745106566C for ; Fri, 22 Aug 2008 10:24:58 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 829688FC14 for ; Fri, 22 Aug 2008 10:24:58 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KWTp5-0005Hr-EJ for freebsd-arch@freebsd.org; Fri, 22 Aug 2008 10:24:51 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2008 10:24:51 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2008 10:24:51 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Fri, 22 Aug 2008 12:24:41 +0200 Lines: 30 Message-ID: References: <20080822090448.GB57441@onelab2.iet.unipi.it> <48AE89DC.9080408@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.16 (X11/20080724) In-Reply-To: <48AE89DC.9080408@yandex.ru> Sender: news Subject: Re: Magic symlinks redux X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2008 10:24:58 -0000 Andrey V. Elsukov wrote: > Luigi Rizzo wrote: >> interestingly simple. >> >> Question - is the process' ENV easily available in this part >> of the kernel, so one could in principle use environment variables >> as replacement strings ? > This was so long ago.. As i remember this patch is a quick port of > NetBSD's implementation and uses the same code. > > Also there was another implementation ported from DragonFlyBSD. > David Quattlebaum is working on varsyms implementation and he sent > fresh patch to me in this April. I attached patch. > And sorry, i am not working on this today.. This patch is huge. As far as I can tell DragonflyBSD has a whole framework dedicated to varsyms, spread across a fair part of the kernel and with at least one special userland utility. It allows the operator to define his own variables that can be used in the substitutions, and I don't see that it predefines "special" variables like "uid" and "hostname". It's not necessarily a bad solution but I consider it overkill. Anyway, the syntax of DFBSD's varsyms is similar but sufficiently different from NetBSD's magicsyms implementation that both can coexist. DFBSD uses ${var} and NetBSD uses @var or @{var} so there's no ambiguity between them. Unless a kernel developer is interested in working the DFBSD's implementation in, I'll push the NetBSD's variant.