svn commit: r312404 - head/usr.bin/sed

Conrad Meyer cem at freebsd.org
Fri Jan 20 06:43:27 UTC 2017


On Thu, Jan 19, 2017 at 10:29 PM, Antoine Brodin <antoine at freebsd.org> wrote:
> On Thu, Jan 19, 2017 at 9:01 AM, Xin LI <delphij at freebsd.org> wrote:
>> Author: delphij
>> Date: Thu Jan 19 08:01:35 2017
>> New Revision: 312404
>> URL: https://svnweb.freebsd.org/changeset/base/312404
>>
>> Log:
>>   Use S_ISREG instead of manual & (also it's better to compare the
>>   result from & and the pattern instead of just assuming it's one bit
>>   value).
>>
>>   Pointed out by Tianjie Mao <tjmao tjmao com>.
>>
>>   MFC after:    2 weeks
>>   Differential Revision:        https://reviews.freebsd.org/D4827
>
> Hi,
>
> sed -i no longer works on symlinks which breaks lots of ports.
> Please revert and request an exp-run.

That is clearly the intent of the code in question.  It was a bug that
it worked before — S_IFLNK and S_IFSOCK just happen to have the
S_IFREG bit set.  It seems like either such ports should be fixed to
dereference the link manually, or the check should be removed
entirely.

Best,
Conrad


More information about the svn-src-all mailing list