From owner-freebsd-current@FreeBSD.ORG Thu Apr 5 21:05:39 2007 Return-Path: X-Original-To: current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67AE316A403; Thu, 5 Apr 2007 21:05:39 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id 12AF413C44C; Thu, 5 Apr 2007 21:05:39 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by postfix1-g20.free.fr (Postfix) with ESMTP id 3E386D28F77; Thu, 5 Apr 2007 22:35:10 +0200 (CEST) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id D54AA43466; Thu, 5 Apr 2007 22:35:08 +0200 (CEST) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id A67509D619; Thu, 5 Apr 2007 20:35:04 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 80F28405B; Thu, 5 Apr 2007 22:35:04 +0200 (CEST) Date: Thu, 5 Apr 2007 22:35:04 +0200 From: Jeremie Le Hen To: Maxim Sobolev Message-ID: <20070405203504.GA11297@obiwan.tataz.chchile.org> References: <46128475.9060602@FreeBSD.org> <4613D6F3.4080701@mac.com> <461434A6.3080001@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <461434A6.3080001@FreeBSD.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: Andrew Pantyukhin , FreeBSD Current Subject: Re: Surviving /dev/null disappearance X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2007 21:05:39 -0000 Hi, Maxim, Andrew, Chuck, On Wed, Apr 04, 2007 at 04:28:38PM -0700, Maxim Sobolev wrote: > >>Isn't there some safety-net wrapper function that > >>refuses to remove device nodes and maybe some other > >>types of files? > > > >Why not set a filesystem flag like schg on device nodes under a devfs > >tree...? > > Well, I suspect that it may cause ld(1) fail instead. What we want it to > do is to not perform unlink(2) before open(2) when -o argument is device > node. Do you have any idea why ld(1) doesn't merely use open(2) with O_TRUNC, instead of unlinking the file ? Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >