Date: Tue, 1 Aug 2006 13:06:55 -0400 From: Garance A Drosehn <gad@FreeBSD.org> To: Ivan Voras <ivoras@fer.hr>, freebsd-hackers@FreeBSD.org Subject: Re: [PATCH] adding two new options to 'cp' Message-ID: <p06230908c0f53813965d@[128.113.24.47]> In-Reply-To: <ean95a$e1u$1@sea.gmane.org> 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> <ealpn1$lan$1@sea.gmane.org> <20060801072611.GA717@turion.vk2pj.dyndns.org> <ean95a$e1u$1@sea.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06230908c0f53813965d>