From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 1 17:07:04 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 EEAD816A4E5 for ; Tue, 1 Aug 2006 17:07:04 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp5.server.rpi.edu (smtp5.server.rpi.edu [128.113.2.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9833143D53 for ; Tue, 1 Aug 2006 17:07:03 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp5.server.rpi.edu (8.13.1/8.13.1) with ESMTP id k71H6uF9010407; Tue, 1 Aug 2006 13:06:57 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <200607271150.k6RBoM9p031745@lurza.secnetix.de> <44C8FB65.9020102@FreeBSD.org> <44CE03D2.2050803@centtech.com> <17614.4005.407223.621637@bhuda.mired.org> <44CE199C.2020500@centtech.com> <17614.8289.134373.387558@bhuda.mired.org> <96b30c400607310847s1d2f845eo212b234d03f51e9a@mail.gmail.com> <17614.10982.499561.139268@bhuda.mired.org> <20060801072611.GA717@turion.vk2pj.dyndns.org> Date: Tue, 1 Aug 2006 13:06:55 -0400 To: Ivan Voras , freebsd-hackers@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-CanItPRO-Stream: default X-RPI-SA-Score: undef - spam-scanning disabled X-Scanned-By: CanIt (www . canit . ca) Cc: Subject: Re: [PATCH] adding two new options to 'cp' 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: Tue, 01 Aug 2006 17:07:05 -0000 At 12:07 PM +0200 8/1/06, Ivan Voras wrote: >Peter Jeremy wrote: > >>Note that it isn's possible to accurately distinguish >>between a block of NULs and a hole in the file through >>the filesystem. The only way to accurately copy a >>sparse file is with dump/restore. > >Hence the need for an explicit switch. The point is not that you need an explicit switch, the point is that you have to add a lot of code to 'cp' for 'cp' to do the job correctly. You are changing the nature of how the command works. I very much doubt you can implement that *correctly* in a mere 160 bytes of additional object code! Note: -r-xr-xr-x 1 root wheel 15348 [date] /bin/cp -r-xr-xr-x 2 root wheel 44288 [date] /sbin/dump -r-xr-xr-x 2 root wheel 58736 [date] /sbin/restore I realize a lot of these decisions are somewhat subjective. "One person's feature is another person's bloat". But in the case of this specific example, I (personally) would not want 'cp' to implement every detail which is already handled by dump/restore. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA