Re: Short circuit cp -l

2018-07-18 Thread Rhialto
On Wed 18 Jul 2018 at 13:02:03 +, Christos Zoulas wrote: > Let's survey the other implementations (linux, etc.) and see what they > do, and decide. We should document this clearly as well as stating what > other implementations do, and why we decided to do what we decided so others > don't have

Re: Short circuit cp -l

2018-07-18 Thread Christos Zoulas
In article , D'Arcy Cain wrote: >On 2018-07-18 02:11 AM, Robert Elz wrote: >> You do understand though that you have changed the semantics? The >> old way, cp -l would only link the files that could have been copied, now >> it will happily link unreadable files. Also cp -il will no longer work

Re: Short circuit cp -l

2018-07-18 Thread D'Arcy Cain
On 2018-07-18 02:11 AM, Robert Elz wrote: > You do understand though that you have changed the semantics? The > old way, cp -l would only link the files that could have been copied, now > it will happily link unreadable files. Also cp -il will no longer work, and > probably more. I missed that.

Re: Short circuit cp -l

2018-07-18 Thread Robert Elz
Date:Wed, 18 Jul 2018 07:04:24 -0400 From:chris...@zoulas.com (Christos Zoulas) Message-ID: <20180718110424.78f0f17f...@rebar.astron.com> | Well, in that case we should check what POSIX says about it There is no -l in posix cp | and what do other implementation

Re: Short circuit cp -l

2018-07-18 Thread Christos Zoulas
On Jul 18, 1:11pm, k...@munnari.oz.au (Robert Elz) wrote: -- Subject: Re: Short circuit cp -l | Date:Tue, 17 Jul 2018 09:06:53 -0400 | From:"D'Arcy Cain" | Message-ID: <409f3df1-c91c-897c-e4ea-98413263f...@netbsd.org> | | | Do you think tha

Re: Short circuit cp -l

2018-07-17 Thread Robert Elz
Date:Tue, 17 Jul 2018 09:06:53 -0400 From:"D'Arcy Cain" Message-ID: <409f3df1-c91c-897c-e4ea-98413263f...@netbsd.org> | Do you think that this is a candidate for a pullup to 8? You've already been informed that it is too late for 8.0 (and I don't think that is the

Re: Short circuit cp -l

2018-07-17 Thread maya
On Tue, Jul 17, 2018 at 09:06:53AM -0400, D'Arcy Cain wrote: > On 2018-07-17 08:41 AM, Christos Zoulas wrote: > > Well, the comment needs to be amended, since you don't need to close the > > fd's anymore. Other than that it looks fine. > > Great! I went ahead. > > Do you think that this is a can

Re: Short circuit cp -l

2018-07-17 Thread Christos Zoulas
In article <409f3df1-c91c-897c-e4ea-98413263f...@netbsd.org>, D'Arcy Cain wrote: >On 2018-07-17 08:41 AM, Christos Zoulas wrote: >> Well, the comment needs to be amended, since you don't need to close the >> fd's anymore. Other than that it looks fine. > >Great! I went ahead. > >Do you think tha

Re: Short circuit cp -l

2018-07-17 Thread D'Arcy Cain
On 2018-07-17 08:41 AM, Christos Zoulas wrote: > Well, the comment needs to be amended, since you don't need to close the > fd's anymore. Other than that it looks fine. Great! I went ahead. Do you think that this is a candidate for a pullup to 8? -- D'Arcy J.M. Cain http://www.NetBSD.org/ IM:

Re: Short circuit cp -l

2018-07-17 Thread Christos Zoulas
In article <69e203a6-fa65-bc01-f00d-da4b3ea9e...@vybenetworks.com>, D'Arcy Cain wrote: >Years ago I added the -l option to cp. I was looking at it recently and >I saw that it was opening and closing the file even though it never did >anything except link it. > >I want to make the following chang

Short circuit cp -l

2018-07-16 Thread D'Arcy Cain
Years ago I added the -l option to cp. I was looking at it recently and I saw that it was opening and closing the file even though it never did anything except link it. I want to make the following change. Basically it moves the link code to the start of the function bypassing all that extra wor