From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 30 02:06:43 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org 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 A7F8616A415 for ; Mon, 30 Oct 2006 02:06:43 +0000 (UTC) (envelope-from elessar@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9DD743D46 for ; Mon, 30 Oct 2006 02:06:41 +0000 (GMT) (envelope-from elessar@bsdforen.de) Received: from localhost (mail [127.0.0.12]) by mail.bsdforen.de (Postfix) with ESMTP id A29584241CC for ; Mon, 30 Oct 2006 03:06:40 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdforen.de Received: from mail.bsdforen.de ([127.0.0.12]) by localhost (mail.bsdforen.de [127.0.0.12]) (amavisd-new, port 10024) with ESMTP id 3smGLTZ4IZIR for ; Mon, 30 Oct 2006 03:06:40 +0100 (CET) Received: from loki.starkstrom.lan (p549CE7DE.dip.t-dialin.net [84.156.231.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id 9C5E2423DE4 for ; Mon, 30 Oct 2006 03:06:39 +0100 (CET) Date: Mon, 30 Oct 2006 03:06:36 +0100 From: Joerg Pernfuss To: Message-ID: <20061030030636.66af0924@loki.starkstrom.lan> In-Reply-To: <20061030024358.39a12359@loki.starkstrom.lan> References: <20061029222847.GA68272@marvin.astase.com> <20061030003628.42bc5f8d@loki.starkstrom.lan> <00f201c6fbb6$0c6bd150$b3db87d4@multiplay.co.uk> <20061030024358.39a12359@loki.starkstrom.lan> X-Mailer: Sylpheed-Claws 2.2.3 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_apcFppHl5NtD1txbFPDNdOe; protocol="application/pgp-signature"; micalg=PGP-SHA1 Subject: Re: [patch] rm can have undesired side-effects X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2006 02:06:43 -0000 --Sig_apcFppHl5NtD1txbFPDNdOe Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 30 Oct 2006 02:43:58 +0100 Joerg Pernfuss wrote: > That would mean that `rm -P ' with having a link count of > at least 2, would behave like `rm ' (and like Romain suggested). Correction after some `read the frakkin code': if (sbp->st_nlink > 1) { warnx("%s (inode %u): not overwritten due to multiple links", file, sbp->st_ino); return (0); The link is removed, the file is not overwritten and a warning is generated. Joerg --=20 | /"\ ASCII ribbon | GnuPG Key ID | e86d b753 3deb e749 6c3a | | \ / campaign against | 0xbbcaad24 | 5706 1f7d 6cfd bbca ad24 | | X HTML in email | .the next sentence is true. | | / \ and news | .the previous sentence was a lie. | --Sig_apcFppHl5NtD1txbFPDNdOe Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFFRV4tH31s/bvKrSQRAs0oAJ44a4wPbXkdB2Ueie0dxuyCIAKGBwCfbrGo 7ZkP51EAAeWm8c5mrN1aXEc= =+La/ -----END PGP SIGNATURE----- --Sig_apcFppHl5NtD1txbFPDNdOe--